[wp-trac] [WordPress Trac] #28475: Resizing Images in WYSIWYG should use inline css instead of html width and height
WordPress Trac
noreply at wordpress.org
Fri Jun 6 20:20:57 UTC 2014
#28475: Resizing Images in WYSIWYG should use inline css instead of html width and
height
---------------------------+-----------------------------
Reporter: DoodleDogCody | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: TinyMCE | Version: 3.9.1
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
When using the new feature of resizing images directly within the WYSIWYG
editor, Wordpress is change the normal html Width and Height attributes
For instance, this
{{{
<img class="aligncenter wp-image-231" src="domain/image.jpg"
alt="GreenhouseLoft" width="1024" height="1024" />
}}}
becomes this
{{{
<img class="aligncenter wp-image-231" src="domain/image.jpg"
alt="GreenhouseLoft" width="853" height="853" />
}}}
Seemingly this is how it should work, but with many themes and theme
frameworks such as Genesis using Twitter Bootstrap and other CSS Resets as
their base, these calls are over ridden by a simple CSS line like the
following which is very convenient for the rest of the site.
{{{
img { height: auto; width: auto; };
}}}
I would like to suggest that the resizing of the image should take place
in an inline style element which would override the default css above. For
instance
{{{
<img style="width:853px; hieght:853px;" class="aligncenter wp-image-231"
src="domain/image.jpg" alt="GreenhouseLoft" width="1024" height="1024" />
}}}
This will change nothing with themes that don't have a CSS reset that
calls width and height auto on images but will help to fix the problem
with themes that do. As it is currently, resizing images in the editor
with the new click and drag function causes no actual visual change on the
front end of the site.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28475>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list