To remove the inline width in a clean PHP-way could be done with a filter, as described in the source code: https://core.trac.wordpress.org/browser/trunk/src/wp-includes/media.php#L1587
Returning a zero (or false) will remove it:
add_filter( 'img_caption_shortcode_width', '__return_false' );
Related Posts:
- Add custom Attachment Display Setting for images
- Delete the original big size image after upload and leave only 3 images crunched by media gallery
- Post slugs and images cannot have same name?
- Add existing images from Media Library in to custom gallery
- Replace image attributes for lazyload plugin (data-src)
- How do I detach images from posts?
- Download external images if post is publish
- How do I sort (order) the results from `get_children()`?
- upload image in a meta box
- Can I load posts via Ajax?
- How do I use element instead of tags in WordPress post content having webP support?
- How to wrap every image in a post with a div?
- upload featured image from front end using wordpress add media button
- Get post embedded image caption
- how to grab first link in post… and of course call it
- Limit function to specific post category
- Post taxonomy from exif data
- get custom image size
- How to get only text from wordpress post content?
- Get all images out of the posts content
- how to replace embedded “full” sized images within a post with the “large” ones
- WordPress Theory Lesson – Image Columns within posts with alignment?
- Batch process: remove first image from post content
- Show featured image next to post-teasers in Genesis Framework?
- Get image from post’s gallery
- Image Insert into posts and pages not working after 3.2.1 update
- How to retrieve the postID in a “image_send_to_editor” hook function?
- How to display featured image without it appearing in post?
- Can I use images as anchor tags with
- creating front end image uploader that uploads images as posts
- Set size for attachments
- I have a site where attachments in the wp_posts table have guid values of guid, how did this happen?
- List all categories with featured image from post?
- Get all images in post and comments like Twitter before post title
- Issue where WP Featured Image will not display
- Thumbnail Image to go in the post aswell
- Remove Featured Image & All Media Uploaded to the Post
- preg_replace not removed “class”
- Upload attachment from external site
- Get URL from all images in a post
- Disable posts generated from image uploads
- Posts page not showing correct image
- Images showing up in Post Editor, but not in Published Post
- Image behind the post’s title
- How to retrieve certain number of images from a wordpress post?
- Show more than 200 images in one post
- Hide thumbnail if there is a gallery on the post
- Image on rss feed on post
- Change the background of each post according to the category
- How to Featured content with images in home page?
- Where to insert the other site image url for our wordpress post
- select post preview image from nextgen gallery
- How to get the next and previous image title from attachment or gallery?
- Attachment image single page
- How to change the order of elements within a post?
- How to call WordPress First Image Post or else Attached Image or Default
- Regarding Posts
- Site/Post preview is not working on all social media
- Delete media from the post but keep my featured image and post
- Aligning images in the wp editor not working. How do i get this to work in custom theme?
- unable to write to the database while uploading images
- Display image gallery if more than 1 image
- How do I fix broken links to images in imported posts’ post_content?
- Thumbnails and images in the blog post are not loading
- Blog featured images disappeared on my homepage
- Center crop the feature image
- Add another feature image box
- ‘posts’ table should not store the absolute image path
- How to show category image if no featured image is set?
- How to make an image appear as a thumbnail in the blog post?
- Manipulating images inside post content
- Output wp_link_pages as raw url
- How can I alternate styling of images in a post? [closed]
- Embed image in post from external url
- Customizing individual images on posts
- Is possible to do this from function.php
- Update all images url imported from HTML pages
- SQL query to remove first image in all posts
- WP Gallery Image Page Issue When 2 galleries share one image
- Post thumbnail dependant on category
- Latest news mini images
- Why can’t I see my attachment page information for an image?
- How would I attach media/images to a post based on a ID stored in a each post’s custom field
- How do I insert a custom field in a user submitted post?
- Only show posts with image and the correct ammount of posts in loop
- Extra Theme – Fit image inside of Featured Post Slider
- Get attachment if matches a variable
- Is there any SEO impacts on unattached vs attached images for a post in WordPress?
- Full width images within post content
- Import alt text in set_post_thumbnail
- Broken images after importing posts and opening in Gutenberg
- Search doesn’t display posts with images
- Displaying all images from a WordPress post (including media library)
- How to move all images in a post to a single gallery for a bunch of posts?
- Inside post image title has been posting as a post title on my main post page
- Download button under all images WordPress
- Redirection – bulk edit 404s to new tomain
- how to display the actual size of the picture in post
- WordPress portfolio posts: media not displaying if several images
- Set Featured Image of a post