Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Right now I'm using add_image_size to create the thumbnail sizes needed for my theme, completely bypassing the options in Settings > Media since I can't depend on users to enter the correct values manually. However, that means WordPress is creating files for each of those sizes which will never be used. Is there any more efficient approach that would just allow me to override the default values in functions.php instead of creating new ones?

share|improve this question

1 Answer 1

Those setting are saved in options (see options-media.php for option names) so it is not hard to change them.

However those settings are not meant to be changed by theme and I would strongly recommend against messing with them in such way.

Simply put multiple files is how WP (unfortunately and so far) works with images, and it is up to user how to deal with them and not third party theme.

PS I am assuming you are making theme for public release/selling/whatever. If you are going to use it in some locked down environment where decisions are up to you - then feel free to nuke and use native sizes.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.