Announcement

#1 2021-09-28 01:24:39

tiagoc
Member
2021-09-28
8

Images with size smaller than MEDIUM are not displayed

Hi.

All the images smaller than the MEDIUM size setting aren't displayed, because they're not being created/generated.

In Configuration > Options > Photo sizes, MEDIUM size is set to 792 x 594 pixels.
Here, only the default "Square", "Thumbnail" and "Medium" are selected.

In the thumbnails page (example: https://www.cameltrophyportugal.com/fot … ategory/23) all images are created and displayed, and their source is "*-cu_e260x180.jpg". They all link to "picture.php?/<PICTURE-ID>/category/<CATEGORY-ID>". All this seems to be correct.

However, when I click one of the thumbnails, there are 2 different situations:

1) original image is smaller than MEDIUM size (792 x 594 pixels)
example URL: https://www.cameltrophyportugal.com/fot … ategory/23
Original image size (same as saved in "width" and "height" fields in the _images DB table): 552 x 457
Result: image isn't displayed and the source HTML is "<img src="action.php?id=371&part=e" width="552" height="457" alt="CTPB_CT80_006.jpg">"

2) original image is bigger than MEDIUM size (792 x 594 pixels)
example URL: https://www.cameltrophyportugal.com/fot … ategory/23
Original image size (same as saved in "width" and "height" fields in the _images DB table): 475 x 864
Result: image isn't displayed and the source HTML is "<img src="_data/i/galleries/edicoes/CT80_CTPB/CTPB_CT80_007-me.jpg" width="326" height="594" alt="CTPB_CT80_007.jpg">"
The previous example is for portrait/vertical images, but landscape/horizontal images work fine, as well.

If I manually generate a "-me.jpg" file, it still isn't loaded.
Example URL: https://www.cameltrophyportugal.com/fot … ategory/23
Manually created "-me.jpg" image file URL: https://www.cameltrophyportugal.com/fot … 001-me.jpg

The only way for the manually created "-me.jpg" image file to be loaded is if I change the "width" or "height" fields in the _images DB table, to values higher than the MEDIUM size setting, like 793 for "width" or 595 for "height".

However, this is not a solution because if I perform a synchronisation all values in the DB will be updated to the correct ones.

Additional information:
a) The template being used is "SimpleNG" version 3.2.7 (latest available). The same behaviour existed in version 3.2.5.
b) In the "Smart Pocket" template version 11.5.0, there is a difference: in the thumbnails page, only the "correct" images are displayed; the images without "-me.jpg" image file aren't displayed in the thumbnails page (and - of course - the image isn't loaded when the thumbnial is clicked to open the image).

Do you have any idea on how to correct this issue, before I wipe everything and start over?

Thanks!

System information:
Piwigo 11.5.0
Operating system: Linux
PHP: 7.4.23 (Show info) [2021-09-27 23:29:52]
MySQL: 5.7.35 [2021-09-27 23:29:52]
Graphics Library: ImageMagick 7.0.10-10
The only active plugin is "LocalFiles Editor"

Piwigo URL: https://www.cameltrophyportugal.com/fot … ategory/23

Offline

 

#2 2021-10-02 00:35:08

tiagoc
Member
2021-09-28
8

Re: Images with size smaller than MEDIUM are not displayed

Looks like a new installation is on the way... :(

Offline

 

#3 2021-10-05 07:01:32

dd-b
Member
Minneapolis, MN USA
2018-04-16
70

Re: Images with size smaller than MEDIUM are not displayed

This looks enough like a problem I just had with image sizes to make me ask some questions.

Are the images sometimes displayed through PHP code and sometimes handled directly by the server depending on size? (that may only happen if you enable HD images for the users) Do the PHP parts of your site run through FCGI (that'll depend on your host setup).

If both of those are true it might be a simple file protection problem for one or the other version; in my case the file uploads had left them owned by my user and with mode 640, so they weren't visible to Apache. So the resized version in the cache directory which were served through PHP worked fine but the full-size images which were served direct through Apache didn't show (they got a 404 error, in fact, but PHP hid that and just didn't display the image).

But in my case it was bigger versions that didn't show; and if PHP wasn't working at all, well, far less would be working on your site, so it's not that. And my case was a different theme, which used different PHP code to serve photos as well.

You might try tracking down the exact URL being sent to the browser for photos (browser DOM browser and such), and copying that into a new tab's address bar, and see if the photo comes up or if there's an error; it was seeing errors when I dug in like that that finally let me figure out what was going on in my situation.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact