I solved it, the problem was a function I used to use and forgot about!
add_filter( 'post_thumbnail_html', 'remove_thumbnail_dimensions', 10 ); add_filter( 'image_send_to_editor', 'remove_thumbnail_dimensions', 10 ); function remove_thumbnail_dimensions( $html ) { $html = preg_replace( '/(width|height)=\"\d*\"\s/', "", $html ); return $html; }
I removed this function and everything is OK now.
Related Posts:
- Multi user site and image captions
- Text editor on WP caption [closed]
- How to remove a empty in wp caption shortcode?
- Add extra class to wp-caption?
- wp_get_attachment_caption to pull Image Caption or alt
- Showing image description along with embedded links below post images
- Captions for More Fields groups, not just individual fields
- How to add line breaks inside Gallery Captions
- How to get the_post_thumbnail caption?
- Remove wp-caption but still show the image
- Image caption not rendering on some images – Shapely theme
- slider stripping out caption/excerpt line breaks
- How to always add caption element to images – even if empty?
- Get Image Description
- make WordPress image captions responsive
- How to have different captions for same image, for galleries?
- Featured image shortcode
- Are captions stored anywhere?
- How to wrap WordPress image captions inside H2, H3 tags?
- Remove image caption from post excerpt
- Is there a way to define a default caption to all uploaded images
- How to add a link in a image’s caption?
- Alter media caption/description conflict in WordPress?
- Multi-line captions on attachments
- How to display a shortcode caption somewhere other than the_content
- Caption in Page adding unwanted 10px to width
- How to limit post content and remove image caption from it
- Update caption for metabox gallery images
- How to show post format gallery metabox image caption in the post front end
- Get image captions for images on gallery post format metabox
- Get post embedded image caption
- Adjust image caption within visal editor
- Different captions for the same image in multiple galleries. Edit Image in Gallery locally
- Adding a video description in a similar way to a image caption
- Include captions
- Remove inline width from figure
- How do themes render caption texts in extended markup (e.g. “wp-caption” paragraphs)
- HTML tags in WordPress image caption
- Add attribute to caption shortcode from custom attachment field
- Automatically add image caption with values from a post parent field?
- Getting Featured Image Caption to Only Show if Populated
- Caption shortcodes not including caption as attribute
- Add post-thumbnail after first paragraph including the caption
- Gallery IDS and Captions: hide/show on a per ID basis
- Add caption functionality to custom WordPress theme
- echo image caption
- XML-RPC: How to add media caption to uploaded image?
- How to check if there is image title, caption, description?
- Include caption underneath post images
- Turn off image captions in gallery view?
- Move Image Captions Inside Link ( tag) if Added
- Can I nest a element within tags from default wordpress?
- How to add custom classes to figure element only if image has caption?
- modify wordpress caption shortcode
- Replace image caption with its title and description
- Forcing max-width for image captions
- How do I remove featured images and captions from a wordpress RSS feed?
- Way to add captions to gallery images by code
- How to dynamically insert in the image caption?
- Displaying an image’s alt title and caption inside a fancybox window. Working, but showing the same alt and caption for each image
- Displaying caption with featured image
- add_filter img_caption_shortcode not implemented
- Shortcode function doesnt work without caption
- Custom field as featured image caption
- How to add a caption to an image attachment in a file list?
- caption shortcode using image alt as caption
- WordPress Caption Formatting
- WP Gallery showing captions twice
- How to edit caption for images and exclude it from excerption query?
- Display a post attachment depending on the caption
- add image caption
- Style wordpress image captions in RSS
- Place image caption outside of figure tag (Gutenburg Image Markup)
- How to join Caption AND Description Meta Fields as one combined-caption in Image Block
- Not able to remove caption shortcode from the content
- How to modify image caption in posts?
- how automatically show the image title before the image caption/description in a wordpress gallery?
- How to Display Image Caption but Not Alt Text
- How to auto add image caption from image alt?
- Unknow shortcode read on display site
- Is there a way to create referable automatic numbering in image captions?
- How to hide / remove attachment “alt” or “caption” field in Admin?
- Problem to return more than single line captions
- Displaying “alt” attribute text as captions?
- Add caption to thumbnails in content
- How do I change the woocommerce product gallery to show all thumbnails instead of three at a time in a carousel?
- Automatically Add Caption Shortcode to Image with Caption Field Filled In
- Move captions under gallery images in twenty fourteen theme
- page displaying media caption shortcodes
- SQL query to remove first image in all posts
- How to change images size after theme modification?
- Dynamically adding Captions to images
- How to add a credit line to a photo caption
- Move caption in on attachment page
- Wrap a post image with a div if it doesn’t have a caption
- Seeking recommendations on Gallery plugins , specifically captioning thumbnails [closed]
- Check if a field is capitalized?
- How to show image caption in Woocommerce gallery
- How to display featured image caption only if exists?
- Adding caption to all images inside an article