derdesign/mr-image-resize — pull request #3 by OriginalEXE (2013-09-10 17:54:21+00:00)
Title: Added $crop in filename, if set to true

Ok, so I was thinking it would be wise to add '_crop' to the file name, if $crop is set to true.

The reason is, if for example I am using same image size, let's say 400 x 400 on two places in my theme. Now, in one place, I need exact dimension, so I crop the image, but on other place, I don't need cropping, only scaling. Now, since $crop = true version has been created, and let's say align was not touched, when I request image with $crop = false, it will still return cropped image, since it has the same filename.

To reproduce this,

// crop version
mr_image_resize( 'http://localhost/wp-content/uploads/2013/08/image.jpg', 400, 400, true, '', false );
// File name is now image-400x400.jpg

// scale version
mr_image_resize( 'http://localhost/wp-content/uploads/2013/08/image.jpg', 400, 400, false, '', false );
// It returns cropped version again, since file check returns file is there

Let me know what you think.