Thank you everybody 
i already use add_image_size and then grab that size with the appropriate function for the use. But I use TimThumb (for now) for images with dynamic size (for example giving the user an option to decide the height).
But you gave me a good idea, since the most optional value I use in my themes is the height (mostly the width is predefined and should be fixed), so i can use add_image_size with the needed max width and semi-open height (say 9999), this will generat an image size with the right width with its auto height, then I can achieve the optional height with css.
What do you think? any one tried that successfully before?
premitheme said
Thank you everybody![]()
i already use add_image_size and then grab that size with the appropriate function for the use. But I use TimThumb (for now) for images with dynamic size (for example giving the user an option to decide the height).
But you gave me a good idea, since the most optional value I use in my themes is the height (mostly the width is predefined and should be fixed), so i can use add_image_size with the needed max width and semi-open height (say 9999), this will generat an image size with the right width with its auto height, then I can achieve the optional height with css.
What do you think? any one tried that successfully before?
Or you could just leave the height field blank, instead of ‘450’ it should be ’’. I guess it doesn’t break things, haven’t tested yet.
With add_image_size if you set the height or width to 0, it should autoresize that dimension of the image. The main issue to be concerned with is that multiple images are created for each image uploaded. If you have 5 custom images using add_image_size, a person can potentially have 8 images created for each image they upload. The 3 standard sizes – thumbnail, medium, large – plus the five you specified.
Yeah, add_image_size + get_the_post_thumbnail works nicely for post thumbnails. What about if you wanted to resize a certain image from the media library, that maybe isn’t part of that post / page? I use vt_resize now, but would love to know what you guys are using. Thanks!
- Attended a Community Meetup
- Author had a File in an Envato Bundle
- Author had a Free File of the Month
- Author was Featured
- Beta Tester
- Bought between 1 and 9 items
- Contributed a Blog Post
- Contributed a Tutorial to a Tuts+ Site
- Envato Staff
I’d recommend to utilize the WordPress default built-in resizer.
On one hand using WordPress native resizer is the “right” way to do it. To cut the long story short, it will allow you not to wary about additional setup required for theme installation. E.g. your buyers will have no need to set CHMOD on TimThumb cache folder manually – so you will have less support requests. In other words, using native WP tools insure that your theme will work on any wordpress-powered site without additional setup.
On the other hand using TimThumb allows you to store all additional images in single folder, so your buyers will be able to remove unnecessary images with theme itself. Also TimThumb automatically clears its cache folder from unnecessary images. This is impossible with standard WP tools (and “uploads” folder soon will become littered with unnecessary images).
For our newest themes we developed more intelligent algorithm that uses standard image sizes (if they suits theme) or timthumb (if resize required).
P.S. All IMHO 
- Author had a File in an Envato Bundle
- Author was Featured
- Bought between 1 and 9 items
- Europe
- Exclusive Author
- Has been a member for 2-3 years
- Item was Featured
- Referred between 100 and 199 users
Dream-Theme said
For our newest themes we developed more intelligent algorithm that uses standard image sizes (if they suits theme) or timthumb (if resize required). P.S. All IMHO![]()
That will only give you the same amount of support questions
I am looking for ideas too for this one! I want to use add_image_size but what do i do with a slideshow shortcodes? I cannot resize images given to the shortcode with wordpress 
duotive said
That will only give you the same amount of support questions![]()
Yep:) But this allows to maximally optimize server resources usage (CPU, memory, disk space). Also it will allow not to create tons of junk in uploads folder and DB
