Not a PHP solution, but below is a jQuery option.
var images = $('.entry-content img');
images.each(function() {
var src = $(this).attr('src'),
// removes the img size off the src e.g -300x300.
newsrc = src.replace(/-\d+[Xx]\d+\./,'.');
$(this).attr('src',newsrc);
});
You would need to remove some of the classes e.g size-thumbnail
Related Posts:
- How do I change/modify the_post_thumbnail(); html output?
- What’s the best way to use the Featured Image for responsive web design?
- How to add a class to the attachment images
- Change the filename format of saved featured images
- How to register images uploaded via FTP in media library?
- Using file_exists to check file in Uploads
- Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”
- Rename image uploads with width in filename
- Admin Media grid view images won’t load
- WordPress remove EXIF Data from specific Thumb
- Add custom image sizes to media uploader
- Conditional Statement – check if post has an attachment image
- How to upload imagick resource to media in wordpress
- Use Filename for Alt and Title Tags
- Change Width of Featured Image Thumbnail on Add/Edit Post Page
- Use Timber/Twig to pull an image by image ID [closed]
- Adding graphics to 404.php page
- Add custom HTML to posts page
- Strip Image Classes from HTML Output
- Additional image sizes are not being generated
- Adding a querystring to an image URL when clicking ‘insert into post’?
- How to insert a local image with custom size
- Change logo based on incoming domain
- Theme currently showing thumbnails, how to show full size?
- Validate Uploaded Image using WordPress’ Built-in Functions?
- Get most recent media upload
- Convert all images to PNG on file upload
- Auto crop images in WordPress
- How do I let users upload files to a chosen location?
- Get different images for mobile and desktop with php, advanced custom fields without using js and ajax
- add_image_size for header_image
- Get image’s size name from it’s dimension
- Cannot display or echo alt text on featured image
- Recent posts with featured image or fallback image with permalink
- Set the background to a default image if there isn’t a specified “featured image”
- Mass update excerpt
- How to control WordPress image metadata (using Imagick)?
- Reprinting tags with all attributes
- How to get next image with this code from same post?
- Can’t upload image using media_sideload_image
- How to use thumbnail size of image if I’m only using src to get image
- 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
- Scrape external webpage for first image and add it to new post
- “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
- Timthumb.php image gallery not working on Multisite WordPress
- Where are the src and srcset sizes coming from?
- HTML showing after PHP code in tag
- 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
- Shortcode function doesnt work without caption
- Get featured image with custom size outside WordPress
- Images Uploaded saving onto older/previous year folders
- 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
- How to Make Thumbnail of Post Stay Animated
- 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
- Checking page before applying image restrictions while uploading
- Change extension to .jpg when webp is not supported
- Prepend to all image URLs with PHP, only for mobile devices
- Change the URL of an image from wp_get_attachment_image_src for Product Posts based on Category
- Update Images after edit via php
- 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?
- How to get the url of the entry in which an image belongs
- 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
- Get the image title and alt from custom query
- Retrieving specific images from Media Library
- How do I routinely extract the thumbnail of the most recent post?
- 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?
- Creating image gallery in wordpress
- Image limit from 1 to 5
- Name Input from widget displays Sidebar name instead of saved data
- Changing 2011 theme header image based on user dropdown
- images in wordpress themes
- How to use custom fields to replace top-level parent title with an image using wp_list_pages?
- How do I return an image from a script
- Display Post Titles on top of the_post_thumbnail()
- add if statement to the featured image
- How to automatically convert images to WebP on WordPress?
- Use URL query string in img src attribute
- Add/alter image attribute before render
- How Create Automatically Image jpg.webp from image .jpg without delete or change original images upload
- How can add alt tag in following code. Image are showing dynamic in wordpress
- HELP PLEASE PHP slider css