How to add additional image sizes in WordPress

This is a quick tips for WordPress developers or WordPress website owners. In this tutorial i will explain how to add additional image sizes in WordPress. When you are uploading the images from admin, WordPress will crop your images in tree sizes which is:
Thumbnail size ( Width: 150 and Height: 150 )
Medium size ( Max Width: 300 and Max Height: 300 )
Large size ( Max Width: 1024 and Max Height: 1024 )


Additional wordpress image resize function

If you want to add some additional image sizes rather than the default image sized, then use the below code in functions.php file of your current activated theme.

The image size won’t show up in your media settings screen, but it will automatically cropped during image upload. You can call that image sizes by using post thumbnail like:

How to show custom image sizes in admin media uploader

Want to show custom image sizes in your admin media upload option, then open functions.php file of your current theme and copy paste below code.

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:

Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

Article Tags: , , , , , , ,