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?
Leave a Reply
You must be logged in to post a comment.
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.