The problem was that I read the image sizes inside the “init” hook at which point the additional sizes are not loaded yet by WordPress. I used a “later” hook now and it works.
Related Posts:
- How To Delete Desired Image Sizes From wp-content/uploads?
- Thumbnails of same size with different crop
- image_resize in wp3.5 change to wp_get_image_editor and wont work
- Why is wp_get_attachment_image_src returning wrong dimensions? [duplicate]
- Stop wordpress from creating multiple size images
- wp_get_attachment_image() not working when trying to add width and height attributes
- WordPress 3.5 – Add custom image size
- Add_image_size not cropping
- Custom image sizes only for thumbnails
- Use ‘medium’ size with catch_that_image() function
- How can I get I get the thumbnail custom size dimensions?
- Is there a way to avoid using add_image_size? Best way to manage images
- How to fit image to Thumbnail canvas size?
- Custom image size mixes width and height in output
- Image Sizes/Thumbnails not generating on local install Ampps
- Best way to manage theme images
- add_image_size cropping changes on Mobile devices
- Thumbnails resized and not cropped in the center
- Media Library Image Sizes in Bones theme (add_image_size)
- Check if custom thumnail size image has been cropped to the correct dimensions
- How to disable WordPress from creating thumbnails?
- New image size version only for the Featured Image file
- Is there a hook which fires after all thumbnails are generated?
- How can I upload video, generate thumbnail and convert to different formats?
- How to Delete All regenerated thumbnails but keep the original ones?
- How to Replace YouTube Videos with a “Click to Play” Thumbnail?
- Cropped featured image replaces original image in gallery
- Settings in ‘Media > Settings’ is ignored when inserting images
- How do I delete all generated images from my server except those currently used in posts
- Can WordPress crop only the post thumbnails?
- WordPress remove EXIF Data from specific Thumb
- Store thumbnails and uploads in different directories?
- Getting specific image thumbnail urls of attached images
- Cannot access the thumbnails of attachment images… Cannot find the reason
- Thumbnail is corrupt but image is good
- Thumbnails are not cropped even after selecting “Crop thumbnail to exact dimensions”
- Removing Title Tag from Thumbnails
- Changing playlist shortcode thumbnail sizes?
- How to make programmatic image upload generate thumbnail and sizes?
- Cannot get full thumbnail size using the_post_thumbnail
- Display latest 12 images from media library
- Lazyload post thumbnails
- Customize WooCommerce Product Images (Placement and size) [closed]
- Show featured image next to post-teasers in Genesis Framework?
- Show full image thumbnail
- hover image appears below placeholder instead of overlayed
- Get thumbnail url of custom meta image?
- If I Regenerate Thumbnails, would WordPress delete the existing Thumbnails and replace them with ‘new copies’?
- How to move image thumbnails into custom folder for custom post type
- ‘Thumbnail’ and ‘Medium’ Image sizes are different than expected
- How to get cropped thumbnail source for custom post type
- Update old Post image metadata to ‘thumbnail’ wp_attached_file
- How to stop wordpress always displaying full-res images
- Thumbnail position + size
- Change thumbnail image depending product category
- Fixing image names for a site being restored
- force feed readers to pick atom version
- How to create resized versions of images added with wp_insert_attachment
- Force image crop size in media editor
- Is it possible to change image size used for preview thumnail in Add Media popup
- Regenerate thumbnails for images that are not in the media library
- How can i make this in the_post_thumbnail?
- Dynamic image crop in WP 3.0+?
- Post Gallery list attachments except the one used as post thumbnail
- How do I get a smaller size of an avatar image
- Why WordPress suddenly changed sizes of thumbnails?
- Rebuild thumbnails via WP Cli – how?
- Can we use featured image as third party website image URL
- add_image_size not working
- Why this thumbnail hard crop code does not work?
- Product Images Low Quality After Updating From WP 3.5 to 4 [closed]
- How to Make Thumbnail of Post Stay Animated
- adding image to post thumbnail from another server
- Disabling image thumbnails and automatic regeneration
- Stop ‘alt’ from being added to the_post_thumbnail
- how to change format jpg to webp?
- Images not showing after wordpres update 5.6
- How to use default image as featured image by implement some code in function.php
- Auto Generate Thumbnail
- Can’t add thumbnail theme support
- unsharp thumbnails after uploading image
- ADD class to all my images (thumbail)
- When upload a PNG a noise appears in the thumbnails
- Thumbnails are hard cropped not matter what
- I cannot upload images to post or the media library in wordpress
- How to reduce unnecessary thumbnail creation?
- Blank image thumbnails in media library
- How to disable post-thumbnail from generation?
- how to place ELSE on if function on multipostthumbnails? [closed]
- resizes images on the fly
- How Do I Auto Generate Thumbnail from First Embedded Image?
- Generate thumbnails like 500px.com
- Trouble Retrieving Thumbnail URL on Front-Page
- Can’t edit thumbnails
- Get a different size of Image thumbnail while working with custom metabox
- Add custom version to an image
- How can I server scaled images?
- How can I add a featured thumbnail into a div via a data-image-src?
- Thumbnail size keeps resetting automatically
- Getting post-thumbnail hentry category-error – How can I fix