How to add additional WordPress image sizes

You can add as many individual image sizes to your WordPress site as you like by using the following function.

Add the following code to your functions.php file of the theme you wish to use the custom image sizes for.

Your custom image sizes won’t show up in your media settings, or your post edit screen, but it will be usable when calling a post thumbnail via PHP, like so:

Related Links:


Leave a Reply

Your email address will not be published. Required fields are marked *

Snippet Info

Tested with Wordpress v. 4.9.5
Last Modified: 15.05.2018
Last Reviewed: 15.05.2018

How to add additional WordPress image sizes
4.3 (86.67%) 6 vote[s]
Please report broken snippets.
Report Broken Snippet
WP Engine