305 posts
  • Has been part of the Envato Community for over 2 years
  • Sells items exclusively on Envato Market
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?

1509 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
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+

350 posts Gambit
  • Has been part of the Envato Community for over 5 years
  • Has referred 10+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 100+ items on Envato Market
+4 more
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

1509 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
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).

24 posts
  • Has been part of the Envato Community for over 1 year
  • Located in Egypt
  • Sells items exclusively on Envato Market
divme says

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

1 post
  • Has been part of the Envato Community for over 6 years
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
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!

611 posts Don't be so humble - you are not that great.
  • Has referred 50+ members
  • Has sold $75,000+ on Envato Market and is now an Elite Author
  • Has collected 10+ items on Envato Market
  • Helped protect Envato Market against copyright violations
+5 more
plusquare says

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

Cheers

384 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Sells items exclusively on Envato Market
  • Made it to the Authors' Hall of Fame
+6 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.

1509 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+2 more
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
  • Has been part of the Envato Community for over 2 years
  • Has collected 10+ items on Envato Market
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

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by