Stop cutting off images when "too" wide...

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
doktornotor
Registered User
Posts: 27
Joined: Wed Dec 21, 2011 5:34 pm

Stop cutting off images when "too" wide...

Post by doktornotor »

Really cannot believe this still has not been fixed.

Open: styles/prosilver/theme/common.css

Find:

Code: Select all

img {
	border-width: 0;
}
Replace with:

Code: Select all

img {
	border-width: 0;
	max-width: 100%;
}
This is extremely annoying when people post screenshots, the issue can be seen in loads of thread on the forum here.

User avatar
naderman
Consultant
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: Stop cutting off images when "too" wide...

Post by naderman »

Please create a ticket on the bug tracker for this, thanks!

doktornotor
Registered User
Posts: 27
Joined: Wed Dec 21, 2011 5:34 pm

Re: Stop cutting off images when "too" wide...

Post by doktornotor »

Sure thing, will do ASAP. ;)

User avatar
Arty
Former Team Member
Posts: 985
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: Stop cutting off images when "too" wide...

Post by Arty »

That's a bad solution. It will affect all images, not only images in posts, including custom logos, ads, etc. If you want to resize image, add code for

Code: Select all

.postbody img

doktornotor
Registered User
Posts: 27
Joined: Wed Dec 21, 2011 5:34 pm

Re: Stop cutting off images when "too" wide...

Post by doktornotor »

Arty wrote:That's a bad solution. It will affect all images, not only images in posts, including custom logos, ads, etc. If you want to resize image, add code for

Code: Select all

.postbody img
Well, when your logos/ads end up being cut off, you have a bigger problem I guess? :D Ideally, you should get a full sized image popup after clicking on the shrinked one, which would involve changing the following line in includes/bbcode.php to something suitable for that purpose

Code: Select all

'img'		=> '<img src="$1" alt="' . $user->lang['IMAGE'] . '" />',
Ideally, bundling something like the ReIMG Image Resizer mod would solve all this but that is something left for 3.1.x at best, I'm afraid. Either way, getting the images cut off abruptly is really the worst solution out there.

P.S. Adding the ticket reference: PHPBB3-10543.

User avatar
AmigoJack
Registered User
Posts: 109
Joined: Wed May 04, 2011 7:47 pm
Location: グリーン ヒル ゾーン
Contact:

Re: Stop cutting off images when "too" wide...

Post by AmigoJack »

Personally I dislike resizings (browsers on slow computers are not amused with that). Everything that's missing is a scrollbar in such a case, like you already find it for decades in almost every UI (aka overflow: auto;).

User avatar
canonknipser
Registered User
Posts: 71
Joined: Mon Sep 19, 2011 4:42 am
Location: Germany

Re: Stop cutting off images when "too" wide...

Post by canonknipser »

Personally, i dislike large images in post at all for different reasons.
But in my opinion resizing is much better than having a scrollbar
It should have no effect on browser performance, because in both cases the browser has to load the image complete. Having full-size images, it will break the design of the page, because every content on the right goes off and you have to scroll horizontal, the image is not shown "at a glance" (the same like cutting it!).
Think about hi-res images from a modern DSLR, 6,000px horizontal means you have to scroll 5 complete pages on a 1024px browser window.
Greetings
Frank
phpbb.de support team member - no support via PM or mail
English is not my native language
Extensions and scripts for phpBB

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: Stop cutting off images when "too" wide...

Post by callumacrae »

canonknipser wrote:It should have no effect on browser performance, because in both cases the browser has to load the image complete.
It most certainly will have an affect!
Made by developers, for developers!
My blog

doktornotor
Registered User
Posts: 27
Joined: Wed Dec 21, 2011 5:34 pm

Re: Stop cutting off images when "too" wide...

Post by doktornotor »

canonknipser wrote:But in my opinion resizing is much better than having a scrollbar
Yeah, horizontal scrollbars are horrible and break the entire layout.

User avatar
Ger
Registered User
Posts: 293
Joined: Mon Jul 26, 2010 1:55 pm
Location: 192.168.1.100
Contact:

Re: Stop cutting off images when "too" wide...

Post by Ger »

See tracker for proposed fix:
http://tracker.phpbb.com/browse/PHPBB3-10543
Above message may contain errors in grammar, spelling or wrongly chosen words. This is because I'm not a native speaker. My apologies in advance.

Post Reply