Assuming you are using ImageMagick (the WP standard) as your library there is a filter called image_strip_meta
which controls whether the EXIF data must be preserved. Normally you would just use a boolean to do an overall setting, but you could easily make that a function like this:
add_filter ('image_strip_meta','wpse239481_conditional_strip')
function wpse239481_conditional_strip {
if (...condition ..) return true else return false;
}
The problem is in the condition. You would need to access the current thumbnail label, which doesn’t trickle down from the multi_resize method that sets thing going. However, the target width and height are known in the resize function where the filter resides. Still, you can’t access those dimensions inside the filter unless you hack the core to make this instance of apply_filters
pass parameters.
Unless of course, someone smarter than me knows a trick.
Related Posts:
- Additional image sizes are not being generated
- hover image appears below placeholder instead of overlayed
- How to use thumbnail size of image if I’m only using src to get image
- Else/If Statement to Display Photo Descriptions
- How to Make Thumbnail of Post Stay Animated
- PHP-Code inside Href-Tag
- get_children displaying images removed from the page
- Why is image hard cropping for one image using add_image_size not working?
- Enable custom logo upload if logo is not in header
- Why my image upload button is not working in wordpress widget area?
- Scrape external webpage for first image and add it to new post
- How to make own crop image function for WordPress plugin
- “imagejpeg” function is not working in wordpress
- Display image from an external rss feed on wordpress without plugins
- WordPress automatically adds links to uploaded images
- Thumbnails appear to be zoomed
- WordPress function when file is uploaded, deleted or edited
- ‘Post-thumbnails’ feature does not seem to register
- Download images from media library to computer in BULK?
- Three Questions with Twenty Eleven theme
- get taxonomy thumbnail and use it as a variable in code
- How to loop through all the attached images in a post, and get their url one by one
- Which function crops images in wordpress?
- Division by zero error in image.php
- Resize image to specific dimension (X to Y ratio)
- How can I automatically resize up images to fit into all of my registered image sizes
- Clickable image link sends people to wrong URL
- Only show image from custom field when present
- Timthumb.php image gallery not working on Multisite WordPress
- Upload non-featured image to image field
- Where are the src and srcset sizes coming from?
- HTML showing after PHP code in tag
- Custom Post type slider with thumbnail navigation
- Only show first image in foreach loop
- trying to get wp_get_attachment_url to output clickable link
- Change default gallery images – Currently they are displaying full size imagese
- I’m unable to call img path using single quotes in an array?
- Creating black and white copy of an image [closed]
- Get the id of all images in a post
- Shortcode function doesnt work without caption
- Get featured image with custom size outside WordPress
- Images Uploaded saving onto older/previous year folders
- Display an image based on field value
- Add valid XHTML closing img tags to WordPress galleries
- How to set a featured image (thumbnail) with PHP?
- Convert canvas to image and upload image to server
- Controlling image output size ACF repeater [closed]
- Image rotation issue (horizontal picture uploading as vertical) — Exif issue?
- WordPress İmages Upload & Delete Error
- Generate responsive post thumbnails of same size
- Setting a default thumbnail url if no thumbnail
- Attaching images to posts manually (i.e. with custom code, without the use of an API)
- Adding a ‘style=’ bit to image_send_to_editor output
- Convert all uploaded PNG files to PNG-8 format
- foreach repeat html structure after every nth for attachment [closed]
- CSS images don’t show up with bloginfo
- how to show images without passing it to timthumb.php file for resizing
- How to internationalize header image?
- Some problems in custom widget
- Displaying images outside the content
- Checking page before applying image restrictions while uploading
- Generate images with html2canvas and the woocommerce api
- Change extension to .jpg when webp is not supported
- WordPress api post image raw data without being blank in media library
- Prepend to all image URLs with PHP, only for mobile devices
- Retrieve alt text by referencing the img src
- Show next image in array if page is revisited by same logged user
- WordPress loading all local images from specific directory?
- Change the URL of an image from wp_get_attachment_image_src for Product Posts based on Category
- Update Images after edit via php
- not outputting medium size image URL
- Configure WordPress to Use Responsive Image Rendering
- How to use data URL in WordPress?
- Replace background image with post thumbnail in shortcode
- Resize post thumbnail
- Where Do Image Dimensions Get Added To A Filename?
- I have a background-image in css file but don’t show in site.how to fix this prblm. i sent screenshot. thx
- How do I stop an Image Address from loading in the Browser?
- How to get the url of the entry in which an image belongs
- How to add a PHP scripts into WordPress
- Featured images duplicating and replacing next image
- Get list of posts from attachment
- I can’t load my images from a js file using wp_localize_script
- How to create an unordered list of images separate from the content
- Get the image title and alt from custom query
- How to include different html tags in the header for different pages?
- How to always display full size image
- what’s the syntax for if the image exists get the image?
- Showing wordpress latest post thumbnails in slider with auto increment
- How do I get the featured post to share on Social Media and show on Individual Post pages?
- Retrieving specific images from Media Library
- How do I routinely extract the thumbnail of the most recent post?
- How to change this internal image link parameter using PHP?
- add class to background image
- resizes images on the fly
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- Save the outputted image into the Media Library, with a different filename and extension
- Pass php to database in JQuery: With AJAX?
- How to resize an image server-side before upload?