Recent Topics

[6.7.6] Images in posts not resizing

started by on Sep 27, 2016 – Last touched: Sep 29, 2016

Sep 27, 2016 09:34    

In some skins - I note it in Ark skin and Bootstrap blog - images in posts do not resize as you would expect with responsive behaviour, whereas in Business skin, images in posts do resize. There appears to be no difference in the code which displays an image in a post from skin to skin. Is this to be expected of some responsive skins?

Sep 27, 2016 19:22

images in posts do not resize as you would expect with responsive behaviour

what's your expected behaviour? can you send us some screenshots, then we can see the issue you mentioned?

Sep 28, 2016 01:18

I would expect the image to resize within the post across a range of screen sizes. It doesn't, as you can see here. This is Ark. Bootstrap blog behaves the same way. in Business, the image resizes.

Sep 28, 2016 04:04

As far as I understand, the only way to make them responsive is by using Edit >> Images & Attachments >> Attach existing files (or upload them first, of course).
That works, but you will unable to apply any formatting on the images (border, link, etc.).
Although the mods insist B2 is responsive, it is not quite as I understand the term, and not implemented as in some other cms'.
Still, if you go the "attachment" route, it will work for inline images, in my experience, even though the Ark and Bootstrap header images are not "responsive"; they crop rather than scale...
Hoping this helps.

Sep 28, 2016 04:15

I see. I have uploaded the images in that way, but they remain unresponsive to screen size. I guess it is Business! (so to speak)

Thanks for the clarification.

Sep 28, 2016 14:06

I posted a code snippet in another recent thread about constraining images to 100% with (which is not proper responsive treatment but which is what you expect).

THis will also be included in 6.7.7 or 6.8.0

Sep 29, 2016 03:29

That would be this:

<style>
img { max-width: 100%; max-height: auto }
</style>

to be placed in

Collections/Settings/Advanced/Skin and style/Custom meta tag/css section (before </head>)

Thank you.

Sep 29, 2016 04:09

FYI.
I have not implemented this code snippet yet and my inline images are still scaling properly.
If the suggested mod works for you, great.
If not, maybe you are not quite following the suggested procedure: attach image, set it to "inline", put the cursor on an insertion point and click the + in the green circle in the "Actions" column of the Images & Attachments panel.
The code should look like something like this <p>[image:187]</p>
Hoping this helps.


Form is loading...

blog tool – This forum is powered by b2evolution CMS, a complete engine for your website.