Web based family history software

Question webtrees 2.0.19 thumbnail picture issue

  • janth
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #1 by janth
Some of the thumbnails in my webtrees database turn up with an ugly pink icon with text ".jpg". However when I click on it, the picture associated with it comes up fine. Hope some knows what to do. I have included an example.


signature

Please Log in or Create an account to join the conversation.

  • janth
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #2 by janth
Replied by janth on topic webtrees 2.0.19 thumbnail picture issue
I had a feeling that it might be caused by php7.4-fpm fast-cgi. So I disabled it and the problem disappeared. I guess this option is causing problems and I will simply stop using it. Case closed

signature

Please Log in or Create an account to join the conversation.

  • janth
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #3 by janth
Replied by janth on topic webtrees 2.0.19 thumbnail picture issue
after disabling fpm it is still an issue - sorry. Is there a way to flush the thumbnail cache ?

signature

Please Log in or Create an account to join the conversation.

More
2 years 5 months ago #4 by fisharebest
Replied by fisharebest on topic webtrees 2.0.19 thumbnail picture issue
The errors are not cached.

When you see a file extension like this, it means that webtrees does not know how to display that type of image.

My guess is that you installation of PHP does not have the JPEG library installed.

Control panel -> Server information -> Imagick -> ImageMagick supported formats

Does this have a list of image types, and does it include JPEG?

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • janth
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #5 by janth
Replied by janth on topic webtrees 2.0.19 thumbnail picture issue
Yes, that seems to be correct. It has a ton of image formats including jpeg jpg etc. I wonder if I can just delete the data/cache/* under webtrees directory and expect it to recreate automatically ?

signature

Please Log in or Create an account to join the conversation.

More
2 years 5 months ago #6 by fisharebest
Replied by fisharebest on topic webtrees 2.0.19 thumbnail picture issue
That is where cached files are kept.

BTW - there is a helpful error message in the HTTP response headers.

If you'd posted the URL, instead of a screenshot, I'd be able to tell you what it said.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • janth
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #7 by janth
Replied by janth on topic webtrees 2.0.19 thumbnail picture issue
ok. Is this what you want: (from access.log)
"GET /webtrees/index.php?route=%2Fwebtrees%2Ftree%2Fthomsenfamily%2Fmedia-thumbnail&xref=M381&fact_id=57f28e0f637ef96450ca52f3f2b1709c&w=400&h=520&fit=crop&mark=0&s=4b02055efdc2a3c3ae1cbcd38a81c4e0 HTTP/1.1" 200 739 " xenon.home/webtrees/index.php?route=%2Fw...aniel-Ulrich-Thomsen " "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0"

signature

Please Log in or Create an account to join the conversation.

More
2 years 5 months ago #8 by fisharebest
Replied by fisharebest on topic webtrees 2.0.19 thumbnail picture issue
No. Use the dev tools in your browser.

Look for a response header called X-Thumbnail-Exception

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • janth
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #9 by janth
Replied by janth on topic webtrees 2.0.19 thumbnail picture issue
Hmm. I can open the dev tools but i cant see anything like that. Can I delete the cahce directory ?

signature

Please Log in or Create an account to join the conversation.

More
2 years 5 months ago #10 by fisharebest
Replied by fisharebest on topic webtrees 2.0.19 thumbnail picture issue
Yes - you can delete the cache folder.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • janth
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #11 by janth
Replied by janth on topic webtrees 2.0.19 thumbnail picture issue
I deleted the cache and restarted apache, but same problem

signature

Please Log in or Create an account to join the conversation.

  • janth
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #12 by janth
Replied by janth on topic webtrees 2.0.19 thumbnail picture issue
I can add that now the pink thumbnail no longer has .jpg but 500 written in it. I guess that is an http error code ?

signature

Please Log in or Create an account to join the conversation.

More
2 years 5 months ago #13 by fisharebest
Replied by fisharebest on topic webtrees 2.0.19 thumbnail picture issue
You need to look at the HTTP response headers - or post a URL where we can see it.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

  • janth
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #14 by janth
Replied by janth on topic webtrees 2.0.19 thumbnail picture issue
I think I now found what you needed. The following response correspond to the pink thumbnail with the 500 error code in it.

X-Thumbnail-Exception
ImagickException: cache resources exhausted `' @ error/cache.c/OpenPixelCache/4083

signature

Please Log in or Create an account to join the conversation.

  • janth
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #15 by janth
Replied by janth on topic webtrees 2.0.19 thumbnail picture issue
and another errror mesage. This time the pink icon has ".jpg" in it.

X-Thumbnail-Exception
Intervention\Image\Exception\NotReadableException: Unable to read image from binary data.

signature

Please Log in or Create an account to join the conversation.

  • janth
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #16 by janth
Replied by janth on topic webtrees 2.0.19 thumbnail picture issue
I think I solved the problem - at least for now. After googling about the problem I found out htat imagick has some resoruce limitations defined in a file etc/ImageMagick-6/policy.xml . I changed

<policy domain="resource" name="memory" value="256MiB"/> to
<policy domain="resource" name="memory" value="512MiB"/>

and for now at least the problem have disappeared. Maybe I need to increase further ?

signature

Please Log in or Create an account to join the conversation.

  • janth
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #17 by janth
Replied by janth on topic webtrees 2.0.19 thumbnail picture issue
It may be a good idea to include the contents of imagick polycy.xml file in system information view ?

signature

Please Log in or Create an account to join the conversation.

  • bertkoor
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
More
2 years 5 months ago - 2 years 5 months ago #18 by bertkoor
Replied by bertkoor on topic webtrees 2.0.19 thumbnail picture issue
May I ask (just out of curiousity) what are the typical dimensions of pictures on your site? Or do you have high resolution document scans?

stamboom.BertKoor.nl runs on webtrees v1.7.13
Last edit: 2 years 5 months ago by bertkoor.

Please Log in or Create an account to join the conversation.

  • janth
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
2 years 5 months ago #19 by janth
Replied by janth on topic webtrees 2.0.19 thumbnail picture issue
I tend to include scans of original sources such as church books, census, etc. These files tend to have fairly large dimensions such as 2000 x 3000 pixels but often compress weil, so typical jpeg size is less than 2 MB. I also include high-resolution pictures of family members so they can get quite big at times. But these problems only arose since I moved my webtrees from a small shoebox size PC (shuttle fanless) which died, but ran on Debian 10 with just 8 GB RAM. I moved it to a much more powerful Ubuntu 20.04 with 32 GB RAM and 4 cores etc. So I was surprised to see that I ran into resource problems on this much more powerful machine.

signature

Please Log in or Create an account to join the conversation.

More
2 years 5 months ago #20 by fisharebest
Replied by fisharebest on topic webtrees 2.0.19 thumbnail picture issue
> These files tend to have fairly large dimensions such as 2000 x 3000 pixels but often compress weil, so typical jpeg size is less than 2 MB

The compressed since is not important,

All image libraries must uncompress the image first. If I remember correctly, Imagemagick requires approx 10 bytes per pixel. So, 2000 x 3000 x 10 = 60MB.

We could need 60MB for the original image, 60MB for the scaled watermark image, and another 60MB for the combined image...

> I was surprised to see that I ran into resource problems

You said your policy.xml file set a memory limit of 256MB

Looking at the source-code for ImageMagick, there is a 2GB limit - but it has been commented out, implying no limit.
This is what I see on RedHat and OSX.

On my ubuntu server, I see a 256MB.

So, it looks like this limit is specific to Ubuntu builds of ImageMagick.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum