gambitph / WP-OTF-Regenerate-Thumbnails

Automatically regenerates your thumbnails on the fly when thumbnail sizes change.
https://wordpress.org/plugins/otf-regenerate-thumbnails/
GNU General Public License v2.0
77 stars 16 forks source link

Use for non "Featured Images" #6

Closed generatepress closed 9 years ago

generatepress commented 9 years ago

Love the script - nice and simple always wins.

However, one of my plugins relies on a custom field for the URL to an image which I want to have the option to be resized/cropped.

I have this working when users use the "Featured Image" metabox using the_post_thumbnail, but what can I do when the image is coming from another source? Am I out of luck?

Thanks!

bfintal commented 9 years ago

If you're using the_post_thumbnail and feeding it a size array that your users can change, then OTF should be able to pick up those changes. You can also use add_image_size and change that size.

generatepress commented 9 years ago

Yea I have it working with the_post_thumbnail - works awesome, was just wondering if there was a way to resize an image being called from a custom metabox as well.

bfintal commented 9 years ago

How are you calling the image from the custom metabox?

generatepress commented 9 years ago

It's just a URL to the image.

bfintal commented 9 years ago

Might also need to use wp_get_attachment_image for that

generatepress commented 9 years ago

Perfect, got it working.

Thanks!

bfintal commented 9 years ago

:+1: