How does 3.1 handle image attachments?

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
swanny007
Registered User
Posts: 7
Joined: Thu Feb 05, 2009 12:11 am

How does 3.1 handle image attachments?

Post by swanny007 »

By default, how does 3.1 handle image attachments? In particular I want to know if it:
- automatically resizes the photos when displayed in the thread so they don't stretch out really wide and cause horizontal scrolling
- automatically resize uploaded file to save disk space on the server (using ImageMagick/GD)?

I've had complaints lately about image attachments and how they work on 3.0 so I just want to get a handle on how they will work by default for the next release. It would be nice if someone could upload a full resolution image and have it resized on the server to something smaller.

Thx.

swanny007
Registered User
Posts: 7
Joined: Thu Feb 05, 2009 12:11 am

Re: How does 3.1 handle image attachments?

Post by swanny007 »

Here is a test of an image attachment in area51

OK well it looks like your settings here are to show the thumbnail max width of 400px and retain the full image resolution. That's workable for me but it would be nice to have the original uploaded file resized to like a max of 700 px wide when it's uploaded.
Attachments
inj.jpg
(1.18 MiB) Downloaded 704 times

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: How does 3.1 handle image attachments?

Post by MattF »

- automatically resizes the photos when displayed in the thread so they don't stretch out really wide and cause horizontal scrolling
yes

- automatically resize uploaded file to save disk space on the server (using ImageMagick/GD)?
no
Has an irascible disposition.

User avatar
Louis7777
Registered User
Posts: 394
Joined: Fri Apr 04, 2014 12:32 am

Re: How does 3.1 handle image attachments?

Post by Louis7777 »

VSE wrote:- automatically resizes the photos when displayed in the thread so they don't stretch out really wide and cause horizontal scrolling
yes
I still have horizontal scrollbars on my Xperia S whenever there are big images, even after this was implemented: https://www.phpbb.com/ideas/idea.php?id=118

I can almost see the entire images, but since they don't fit properly in my screen they cause a horizontal scrollbar to appear.

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: How does 3.1 handle image attachments?

Post by MattF »

Louis7777 wrote:
VSE wrote:- automatically resizes the photos when displayed in the thread so they don't stretch out really wide and cause horizontal scrolling
yes
I still have horizontal scrollbars on my Xperia S whenever there are big images, even after this was implemented: https://www.phpbb.com/ideas/idea.php?id=118

I can almost see the entire images, but since they don't fit properly in my screen they cause a horizontal scrollbar to appear.
Well you shouldn't. Only applies to the latest beta of phpBB and you also need to clear out your browser cache.
See: viewtopic.php?f=7&t=45793
Has an irascible disposition.

User avatar
Dragosvr92
Registered User
Posts: 624
Joined: Tue May 31, 2011 12:08 pm
Location: Romania
Contact:

Re: How does 3.1 handle image attachments?

Post by Dragosvr92 »

VSE wrote: Well you shouldn't. Only applies to the latest beta of phpBB and you also need to clear out your browser cache.
See: viewtopic.php?f=7&t=45793
How is that being done? I added .postbody img.postimage { max-width: 99%; } on my prosilver based style and it brings no change. :?
Refreshed theme and browser cache. Is it also using some javascript ? Perhaps i should have replied to the other topic.
Previous user: TheKiller
Avatar on Memberlist 1.0.3

User avatar
Louis7777
Registered User
Posts: 394
Joined: Fri Apr 04, 2014 12:32 am

Re: How does 3.1 handle image attachments?

Post by Louis7777 »

VSE wrote: Well you shouldn't. Only applies to the latest beta of phpBB and you also need to clear out your browser cache.
See: viewtopic.php?f=7&t=45793
That looks fine:
Screenshot2.png
(517.41 KiB) Downloaded 558 times

However, this doesn't:
Screenshot1.png
(380.54 KiB) Downloaded 558 times
Notice the horizontal scrollbar?

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: How does 3.1 handle image attachments?

Post by MattF »

Looks like that's only happening at super small mobile sizes in responsive layouts, and only for attachments it looks like.
Has an irascible disposition.

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: How does 3.1 handle image attachments?

Post by MattF »

Looks like we need to add CSS box-sizing: border-box; to dl.thumbnail img

https://tracker.phpbb.com/browse/PHPBB3-12728
Has an irascible disposition.

User avatar
Louis7777
Registered User
Posts: 394
Joined: Fri Apr 04, 2014 12:32 am

Re: How does 3.1 handle image attachments?

Post by Louis7777 »

VSE wrote:Looks like that's only happening at super small mobile sizes in responsive layouts, and only for attachments it looks like.
More screenshots, from this topic: https://area51.phpbb.com/phpBB/viewtopic.php?t=45433
Screenshot1.png
(218.95 KiB) Downloaded 540 times
Screenshot2.png
(221.52 KiB) Downloaded 540 times
All attachments in that topic (I used it as an example) cause a horizontal scrollbar to appear. The screenshots are from a Sony Xperia S which has quite a big screen.

Post Reply