I am finding a lot of great information for using the_post_thumbnail()
to use this feature as a post hero OR a thumbnail, but I'm struggling to figure out how to use the 'Featured image' as both in my templates.
Here's the gist of what I'm trying do:
- user uploads a featured image to post, which is cropped to 2400 x 1350 px (hero)
- image is also scaled and saved as a thumb at 880 x 495 px (pixel perfect scaling ratio from hero)
- embed hero size
the_post_thumbnail('large')
insingle.php
template andthe_post_thumbnail('thumb')
on the homepage for the post preview
I think I understand how to access and embed the sizes that I would like to use in the appropriate places but I don't understand the workflow for cropping the image on upload and scaling it to multiple sizes. I found set_post_thumbnail_size()
, which gets me halfway there, but how do I create multiple sizes?