• With responsive layout now very common on the web, I find myself wanting to insert pictures into posts by specifying the width of the photo relative to the entire column (ie 1/4 wide) rather than having to use specific pixel dimensions – but there isn’t any way to do this without editing the code and adding a class to the image to correspond to your themes responsive width names. With responsive images now built into the core and some good default sizes, it’s easy for the browser to select the appropriate pixel size image, so we shouldn’t have to fuss with the pixel sizes in the editor anymore!

    Most of the time people will only use some basic withs: 1/2, 1/3, 1/4, 3/4, so if those could be options in the media insert tool (along with default css to power it) that make things SO much easier!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can set your images sizes in percentages as well as pixels. This would allow you to always display an image at 90% width of a div or something to that effect.

    I want to say I am sorry that you would like a solution that doesn’t involve code or adding classes to your CSS, but I really can’t apologize for a skill set that is required when using web based technology.

    Thread Starter swift

    (@swift)

    Seems like you didn’t understand my question – I’m well aware of the ability to set image widths with percentages, but there currently isn’t an easy, graphical way to set image width in percent in the wordpress editor. I certainly can go in and edit the code for each image (which I currently do) but it takes several steps (and time) and most people I design sites for wouldn’t be comfortable doing this themselves.

    One way to accomplish what I’m looking for is for there to be more options in the sizes dropdown when the image gets inserted – instead of just thumbnail, medium, medium-large, large and full, have a couple more options (half width, third width, quarter width etc). The best image gets chosen by the browser from the srcset and so WP just needs to supply some simple built-in CSS to drive it.

    I apologize for not understanding. I shall refrain from further comment. I wish you success with your project.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Insert Relative Size Images in Editor’ is closed to new replies.