292 posts
  • Exclusive Author
  • Has been a member for 2-3 years
crossroad says
I already tried to replace the wp_load_image with wp_get_image_editor function but then it does not work at all, because
$image = wp_load_image( $file_path );
will return a string, while
$image = wp_get_image_editor( $file_path );

returns an array, so the further use of $image becomes invalid. Do you know how to fix that?

1466 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says

Thanks for this awesome script, it works awesome, I just sent you a pull request for fixing the issue when $crop was set to false in WP 3.5+

346 posts Gambit
  • Bought between 100 and 499 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 4-5 years
  • Philippines
  • Referred between 10 and 49 users
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 50 000 and 100 000 dollars
bfintal says

Awesome that my script BFI_Thumb got mentioned, made my day.

Very nice touch on the crop locations! Haven’t checked the code itself, but how do you implement the retina option? When I use my script I just multiply my dimensions by 2

1466 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says

Awesome that my script BFI_Thumb got mentioned, made my day. Very nice touch on the crop locations! Haven’t checked the code itself, but how do you implement the retina option? When I use my script I just multiply my dimensions by 2

Yes, retina is achieved by simply duplicating dimensions (though custom number can be passed as $retina, does not have to be 2).

23 posts
  • Egypt
  • Exclusive Author
  • Has been a member for 0-1 years
divme says

thanks a lot i will try this script in my coming projects ;)

1 post
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
unmaker says

Hi!, i want to use this script, but i dont have clear how to use it. I am already donload the .php file, so where i have to put it, and how i should call it. Then i f i need more than one custom size how can define the sizes and finally how can decide which size use in the loop. Thanks!

580 posts Don't be so humble - you are not that great.
  • Elite Author
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Has been a member for 4-5 years
  • Bought between 10 and 49 items
  • Referred between 10 and 49 users
  • Portugal
plusquare says

Thanks for your work and for sharing mate. Will give it a try in my project!

Cheers

368 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Most Wanted Bounty Winner
  • Europe
  • Referred between 50 and 99 users
  • Exclusive Author
  • Bought between 10 and 49 items
+1 more
pixelgrade says

Just out of curiosity: in what situations do you feel the need to use something extra of the core WordPress image processing (thumbnails), except for the positional cropping? Until now we haven’t encountered the need for this.

1466 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says

Just out of curiosity: in what situations do you feel the need to use something extra of the core WordPress image processing (thumbnails), except for the positional cropping? Until now we haven’t encountered the need for this.
It’s not just about the need, it’s about saving too. With WordPress default image sizes process, all images are resized in all defined sizes on upload, which is not that great, especially for someone that uses a lot of images.

Another thing is that sizes are easily changed. For example, if a customer wants to customize the image size in a content template, he has to do it in one file only and there is no need for regenerating the thumbnails.

Cropping you have already mentioned.

On the other hand, I don’t see a downside of this method, especially if everything is done properly like with this script.

1 post
  • Bought between 10 and 49 items
  • Has been a member for 1-2 years
jodybear says

Hi guys!

…I’ve released an image resizing script which I use in my themes. Uses WordPress native image processing functions. It’s compatible with WordPress 3.5+ and below.

Get the code here: https://github.com/derdesign/mr-image-resize

Enjoy!

Hi Ernie

Thanks for sharing your resizing script.

I’d like to use it with an Advanced Custom Field (ACF) Repeater but I’m having trouble implementing it.

Here’s my ‘standard’ code:

<?php if (get_sub_field('call_to_action_image')) : ?> <img class="feature_img" src="<?php the_sub_field('call_to_action_image'); ?>" /> <?php endif; ?>

How would I use mr-image-resize with ACF?

Thanks in advance Joe

by
by
by
by
by
by