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
- The the_post_thumbnail without srcset?
- Get the first image from post content (eg.: hotlinked images)
- What filters are applied to the_content function?
- Change admin bar to default:off
- Specify image dimensions
- How to get gallery images?
- Display a different theme for not logged-in users
- Add class to before_widget for all widgets with a dropdown and a counter
- 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();
- 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
- How wordpress handle upload images and how to use them in the code
- Featured Image Size
- WordPress nav_menu_css_class theme filter is not being called
- How to set dimensions of the post thumbnails (featured images)
- Cannot get full thumbnail size using the_post_thumbnail
- wp_get_attachment_image_src() width and height boolean
- How to float an image in Gutenberg
- A mystery 300px image size
- Simple way to get two language WP site
- Custom Field returning Numerical Value for Image rather than URL
- Highlight “Show all” item in wp_list_categories
- When trying to override plugin’s function by theme, my filter executes two times, I want it to run only a single time
- Why an arugment is missing in wp_get_attachment_image_attributes?
- Reasons why all thumbnail sizes aren’t working
- Should I use add_filter for functions in function.php of the theme?
- attachment.php code or tutorial
- Change “Thumbnail”, “Medium” and “Large” image sizes using functions.php?
- Default image size not working
- WordPress Media Uploader in page template (On Front-end)
- How do I include pre-installed images in a theme?
- Filter categories used with Custom Structure Permalink
- Add attachment for all images in post
- Changing Header Image Every N Minutes/Seconds
- Do not display post images on front page
- Gallery thumbnails very small
- How to wrap all titles generated by Gutenberg “Heading” block with tag
- Replace single_template filter with what for default posts?
- Custom image size vs CSS sizing
- Getting Different Size Of Attachment Images
- In creating a theme, how can i allow a user to change an image outside post/page content?
- Change Responsive Images Maximum Width of 1600px
- Unique design inside a specific category’s url
- How to show a manageable list of images on a post?
- 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
- how to retrieve the image title for image Post Format
- 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
- 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
- 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
- ACF get_sub_field ALT TAG in the repeater doesn’t show
- WordPress Animation Adjustments
- theme directory fallback image outputs url and not the image
- How to register dynamic settings in WordPress Customizer?
- Post Featured Image Custom Sizing?
- 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?
- 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
- Images use & location, on new wordpress theme
- Caption Shortcode: what filter to change the image size?
- image sizes – finding and removing
- How do I remove p tag *insertions*? Disabling `wpautop` removes manual tags
- 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
- apply_filters to featured image
- Custom image size doesn’t work
- Retina ready for uploaded images which are cropped
- 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
- I want to resize post featured image without cropping image. How?