Inline width and height attributes were never a huge problem with images in WordPress, since these were easily overwritten with CSS.
The problem I’m having is that any images with captions are being wrapped in a ID ‘attachment_(‘attachmentnumber’) and a class of ‘wp-caption’ AND they’re given inline CSS width and height properties.
This is a major pain in the butt, so I’d like to remove the inline styles of this div if at all possible.
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:
You can override inline styles with “!important” like this:
If you want a PHP fix take a look at this:
http://troychaplin.ca/2012/06/updated-function-fix-inline-style-that-added-image-caption-wordpress-3-4/
or javascript/JQuery: