Page 1 of 1

max-width for images and videos?

Posted: Sun Jul 30, 2017 7:23 pm
by db48x
Can the theme be tweaked so that it applies max-width: 100%; to images and videos in posts? This will cause the browser to scale them down so that they fit inside the post, rather than showing them at full size but clipping them. Images and videos that are smaller than the width of the post won't be affected. Thanks!

Re: max-width for images and videos?

Posted: Sun Jul 30, 2017 8:45 pm
by Zeblote
I'm pretty sure it already does this, since I requested it like 1 year ago?

Re: max-width for images and videos?

Posted: Sun Jul 30, 2017 8:50 pm
by Jap2.0
I've seen plenty of images wider than my screen, so no, unless it only scales new images, in which case I'm not sure.

Re: max-width for images and videos?

Posted: Sun Jul 30, 2017 9:02 pm
by Klonan
This image is 4k but looks just fine, fits inside the post pretty reasonably, even though its almost twice my screen resolution

Image

If you could elaborate on the specific problem i could take a look

Re: max-width for images and videos?

Posted: Sun Jul 30, 2017 10:47 pm
by Jap2.0
Yep, that looks fine for me too. Just prior to this, the post I was looking at (the second image) had a picture that went outside the post. I really see no pattern in what does and 2what doesn't, though.

Re: max-width for images and videos?

Posted: Sun Jul 30, 2017 11:18 pm
by Kayanor
Seems to depend on if you are using [img] tags to insert your picture or attachments.

Re: max-width for images and videos?

Posted: Mon Jul 31, 2017 5:54 am
by Zeblote
Jap2.0 wrote:Yep, that looks fine for me too. Just prior to this, the post I was looking at (the second image) had a picture that went outside the post. I really see no pattern in what does and 2what doesn't, though.
Everything on that page looks correct to me.

Re: max-width for images and videos?

Posted: Mon Jul 31, 2017 10:44 am
by db48x
Perhaps I misremembered about images; it's been a while since I posted one.

However, videos need the same treatment; here's one I posted recently: viewtopic.php?f=194&t=46855&p=299916#p299916

Re: max-width for images and videos?

Posted: Mon Jul 31, 2017 12:14 pm
by Jap2.0
Hmm, I don't see the video at all (it's probably my firewall or something), but here is a picture of the pictures from my view (cropped together in paint, there are scrollbars on both axis.

Re: max-width for images and videos?

Posted: Mon Jul 31, 2017 12:15 pm
by Jap2.0
Hmm, that image looks larger than the screen as well. I uploaded it as a .png attachment, if it helps any.

Re: max-width for images and videos?

Posted: Mon Jul 31, 2017 5:00 pm
by orzelek
Both original thread and your image work properly here. And developer mode shows max width set to 100% for image element.
I'm using latest Opera (Chromium) - browser differences maybe?