Okay, the problem was in my interpretation of the filter. I was under the impression that this filter could be used for all images in a post, as they’re all considered attachments in the db (post type – attachment), but it’s actually reserved for the Featured Image/Post Thumbnail. Nowhere in the examples I looked through was this explicitly mentioned…
My mistake, but I wish the info online was more clear about this and the name of the filter had something to do with post_thumbnail or featured image.
Related Posts:
- How to modify an image block in Gutenberg WordPress 5?
- Edit srcset and sizes attributes in Gutenberg image, cover and gallery – blocks
- How to disable thumbnail filter for a specific template part or image size?
- Add rel to all images in a post
- WP “optimizing” PNGs into thumbnails 5X larger than originals – FIX
- optimized PNGs 5X larger than originals
- WordPress Theme Preview Image
- The the_post_thumbnail without srcset?
- Get the first image from post content (eg.: hotlinked images)
- How to remove the Theme Customization Button from the dashboard and themes options page?
- What filters are applied to the_content function?
- Change admin bar to default:off
- How can I set image sizes and still have responsive images using the srcset attribute?
- Add default Backgrounds
- Specify image dimensions
- How to get gallery images?
- Display a different theme for not logged-in users
- Run shortcode before filters
- Add class to before_widget for all widgets with a dropdown and a counter
- add_image_size is scaling, even though crop is set to true
- Featured Image in 4.4 should be larger on mobile device
- How to Auto Approve Comments on a Specific Page?
- How to use the responsive images feature from WP 4.4 in your themes
- Confused about image sizing business in WordPress
- Unexpected width and srcset attributes for the_post_thumbnail();
- Get password when user registers and save it sha1 into database
- How do I get gallery thumbnail URL and change the default thumbnail size?
- Responsive class to all the images in the content
- Passing variable in hooks and filter
- Change image size depending on page
- How to obfuscate theme directory URLs
- Are seven additional image sizes are too many?
- Remove link on full-size images
- CSS class on last post in loop ( custom query )
- How to change footer credit text in Twenty Twenty One theme with a hook?
- how to retrieve the image title for image Post Format
- Use a filter on menu items that have children
- Modify available templates (in dropdown)
- Theme logo metadata into template file
- WordPress creating images if uploaded image is greater than 960px on one side?
- tiny_mce_before_init: ‘exact’ => true has no effect
- How to fix WordPress images not showing up in local hosted XAMPP server?
- How to conditionally add a wp_filter
- Filter didn’t work on content class (hybrid_post_attributes)
- How to set default values for edit_post_link() in my theme?
- Change Image Sizes for Mobile Theme
- Stop WordPress from showing images on non post pages
- Tiny MCE custom styles, and preview in the backend
- How to make excerpt image be full size instead of thumbnail?
- How to add cropped custom header image?
- Is there a way to serve different resolution images to different devices?
- How can I scale down the width of images in bulk that are embedded in posts throughout the site?
- Add image URL automatically to custom field?
- content filter (add_filter) for category description?
- How can I remove image taxonomy pages from my theme and from Google?
- Dynamic Image Links Depending on Excerpt/’Single Post’ View
- Designing a custom archive.php inspired by the Autofocus theme
- Related Post Category Filter
- ACF get_sub_field ALT TAG in the repeater doesn’t show
- Pagination don’t work with active filters
- WordPress Animation Adjustments
- theme directory fallback image outputs url and not the image
- How to register dynamic settings in WordPress Customizer?
- restrain filter on get_the_excerpt to queried item in stead of current post
- Post Featured Image Custom Sizing?
- Image cropping isn’t working correctly when using Offload Media
- WordPress wp_get_current_user returning blank values until refresh
- How to add an image to a theme page template in code?
- Alternative solution for script_loader_tag?
- Alt header logo and link for specific pages
- Responsive Images with art direction
- Customizer Image-Picker Preview Not Working
- WordPress Twenty-Fourteen: How to Remove Home Page Header Image from Other Pages
- Uncaught Reference error in Retina.js
- Make a custom field in admin post.php read only
- Can’t upload images on new theme
- Images use & location, on new wordpress theme
- Caption Shortcode: what filter to change the image size?
- image sizes – finding and removing
- Hook in parent theme Menu function
- How do I remove p tag *insertions*? Disabling `wpautop` removes manual tags
- How to add custom nav_menu_css_class to certain menu only?
- Adding a Class to an Getting From Post Content
- How to manipulate wordpress template tags’ output
- what is do_action(); in wordpress? [duplicate]
- Create image with imagepng() (fails at header)
- Suppress the_content filter in a nested loop
- How do I keep images in posts below a certain size without editing the post?
- Any disadvandages if I style the wordpress align classes without img and .wp-caption prefix
- the_post_thumbnail fetches wrong image
- apply_filters to featured image
- Custom image size doesn’t work
- Retina ready for uploaded images which are cropped
- How can I add a single image from a gallery into the page header?
- Isotope overlapping .items because of featured images – HELP! [closed]
- Custom Theme functions.php – Using add_settings_field and input type=”file” to set custom logo
- Is there any filter or action hook to remove layout classes from appearing in my templates?
- I want to resize post featured image without cropping image. How?
- Only show read more text when when wp:post-excerpt meets excerptLength
- Convert base64 string to WordPress attachment uploads multiple images instead of a single one