Jump to content

Image Scaling with percentage in WYSIWYG Editor


DReffects2

Recommended Posts

Posted

Hey Guys,

so I am constantly having the issue that I'd like to align an image in the wysiwyg editor left or right and in order to have it a pleasant size I have to use absolute pixel values for resizing.

This leads to serious issues with responsive layouts, especially on a mobile device. Take a look at this screenshot:

image.thumb.png.bfee9413b917b5364d1fad646a4f8ba0.png

The image is 300px wide - that's about 30% of the space that's available on a desktop computer and my desired text to image ratio:

image.thumb.png.a60b35095e6f4f559794416c1902a798.png

Now the whole issue would not exist if I'd be able to specify the image width not in pixels but in percent.

With the current setup the css needs to be modified like this:

<a class="ipsAttachLink ipsAttachLink_image ipsAttachLink_right" data-fileid="4474" href="https://www.scifinews.de/uploads/monthly_2017_11/image.png.1e086fc3f939987e8e6865c2638b67af.png" rel="" style="float: right; width:30%;"><img alt="image.png" class="ipsImage ipsImage_thumbnailed" data-fileid="4474" data-unique="wm9tdlt4m" src="https://www.scifinews.de/uploads/monthly_2017_11/image.thumb.png.cfe70849be38725d1a758a1607aa255b.png" style="width: 300px; height: auto;"></a>

This then results in the same look and feel for desktop AND a usable output for mobile:

image.png.810988a3f82fcce1f3a6e648eefdb4d6.png

Would be great if you could make this an option with the wysiwyg editor asap :)

What do you guys think?

 

Posted

I have this issue too when writing articles with images.  I usually hardcode the image's width to not be more than 196 pixels, which looks okay on mobile.  

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...