strange image attachment display behaviour

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Get Involved
Post Reply
User avatar
timelessbeing
Registered User
Posts: 157
Joined: Fri Jul 02, 2010 9:27 pm

strange image attachment display behaviour

Post by timelessbeing »

I attached two PNG images to a post. Both have identical dimensions. Both placed inline. Tags look simply like this:

Code: Select all

[attachment=2]venthose.png[/attachment]
[attachment=3]pcvhose.png[/attachment]
Why is one image rendered as a thumbnail with hyperlink to the actual image file, and the other is rendered full size with no hyperlink?

Link to actual post:
http://chevygmcvans.com/viewtopic.php?t=11053

Thanks.

phpBB 3.3.5
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26546
Joined: Fri Aug 29, 2008 9:49 am

Re: strange image attachment display behaviour

Post by Mick »

290C216D-20E9-4C5B-B796-BE312295836A.png
290C216D-20E9-4C5B-B796-BE312295836A.png (114.35 KiB) Viewed 2894 times

A05C0BF8-F33E-4F6A-A0F2-9924B94A721B.jpeg

The second one I clipped a smidgeon and it shows, presumably, how it should? It’s probably to do with your image settings in ACP> Attachments. The create thumbnail should be yes and the thumbnail width/height should be small.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
timelessbeing
Registered User
Posts: 157
Joined: Fri Jul 02, 2010 9:27 pm

Re: strange image attachment display behaviour

Post by timelessbeing »

Mick wrote: Fri Oct 14, 2022 7:52 am it shows, presumably, how it should?
That is what I would expect. But even in your example ... the sizes are slightly different. The attachment dimensions are exactly the same (to the pixel).
Mick wrote: Fri Oct 14, 2022 7:52 am It’s probably to do with your image settings in ACP> Attachments.
This does not explain why one attachment is displayed one way, and the second attachment is displayed another way.
Mick wrote: Fri Oct 14, 2022 7:52 amThe create thumbnail should be yes and the thumbnail width/height should be small.
Create thumbnail was set to yes.
"Maximum thumbnail width/height in pixel" was 400px.
User avatar
timelessbeing
Registered User
Posts: 157
Joined: Fri Jul 02, 2010 9:27 pm

Re: strange image attachment display behaviour

Post by timelessbeing »

Let's try attaching the same files here ...

Well, well ... same problem on this forum.
Attachments
venthose.png
pcvhose.png
pcvhose.png (11.4 KiB) Viewed 2817 times
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26546
Joined: Fri Aug 29, 2008 9:49 am

Re: strange image attachment display behaviour

Post by Mick »

Did the two pics start out life as screenshots? Can you convert them to jpeg and increase their size and see how they work. I’m just trying to determine if it’s an issue with screenshot pngs, pngs in general or something else.

FWIW - These two images are both jpegs taken with an iPhone and they’re a good deal larger than the thumbnail setting and work ok. I’m not certain what the issue is with your images. Can you try some pics similar to the below that are much bigger than the thumbnail setting on your board and see what happens?

252859C9-D15E-41CE-BB4A-99FE55F85B67.jpeg
4AF58CEC-5F84-45AA-AF4B-D288E631DE88.jpeg
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
timelessbeing
Registered User
Posts: 157
Joined: Fri Jul 02, 2010 9:27 pm

Re: strange image attachment display behaviour

Post by timelessbeing »

pcvhose.jpeg

venthose.jpeg
Mick wrote: Sat Oct 15, 2022 10:05 am Did the two pics start out life as screenshots?
No. But why would it matter? An image is an image.

Here are they are converted to JPEG.

I'll try to find some more examples ...
User avatar
timelessbeing
Registered User
Posts: 157
Joined: Fri Jul 02, 2010 9:27 pm

Re: strange image attachment display behaviour

Post by timelessbeing »

Here are some more B&W PNGs (677x610)
Attachments
647793.png
647793.png (11.4 KiB) Viewed 2674 times
679527.png
679510.png
679510.png (10.44 KiB) Viewed 2674 times
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26546
Joined: Fri Aug 29, 2008 9:49 am

Re: strange image attachment display behaviour

Post by Mick »

It looks to me that the pngs aren’t performing how we would expect in this case but the jpegs are. The reason I don’t know, maybe someone else will chime in.
timelessbeing wrote: Sat Oct 15, 2022 4:54 pmHere are they are converted to JPEG
They seem to be working fine. viewtopic.php?p=15892826&sid=80cc017cf3 ... #p15892826
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
timelessbeing
Registered User
Posts: 157
Joined: Fri Jul 02, 2010 9:27 pm

Re: strange image attachment display behaviour

Post by timelessbeing »

Here are some larger B&W PNGs (1355 x 1221 px)
Attachments
1199447.png
1199441.png
1199377.png
851512.png
User avatar
timelessbeing
Registered User
Posts: 157
Joined: Fri Jul 02, 2010 9:27 pm

Re: strange image attachment display behaviour

Post by timelessbeing »

and here are some small B&W PNGs (317 x 342 px)
Attachments
3431.png
3431.png (3.37 KiB) Viewed 2650 times
1025.png
1025.png (2.92 KiB) Viewed 2650 times
3432.png
3432.png (1.74 KiB) Viewed 2650 times
User avatar
timelessbeing
Registered User
Posts: 157
Joined: Fri Jul 02, 2010 9:27 pm

Re: strange image attachment display behaviour

Post by timelessbeing »

Well I think I've figured it out.
Thumbnail behaviour for PNGs depends on file size not file dimensions. The threshold seems to be 12 kB. Anything below gets displayed full size, no hyperlink, and includes file information caption (ex "pcvhose.png (11.4 KiB)"). Anything above is displayed in reduced size, hyperlinked to the original file, and no info caption.

I think this is undesirable behavior. As has been demonstrated, this creates an inconsistent viewing experience for images with the same dimensions.
I do not believe that PNGs of identical dimensions will differ so drastically in download time, that they would need to be displayed differently. The thumbnailing algorithm should be based on dimension, not file size.
User avatar
Gwyneth Llewelyn
Registered User
Posts: 46
Joined: Thu Aug 06, 2009 11:34 pm
Location: Neufreistadt, Confederation of the Democratic Simulators, Second Life
Name: Gwyneth Llewelyn
Contact:

Re: strange image attachment display behaviour

Post by Gwyneth Llewelyn »

Wow, that was quite a discovery!... I was trying to understand why the behaviour seemed to be so inconsistent when using PNG instead of JPEG. Now I see why!
I'm just a virtual girl in a virtual world...
Post Reply

Return to “phpBB Discussion”