Closed hamx0r closed 7 years ago
webtrees currently has no ability to create thumbnails from URLs. It can only create them from local files.
For historic reasons, webtrees stores the thumbnail alongside the file. The thumbnail for photo.jpg
will be thumbs\photo.jpg
. This isn't possible for URLs.
For webtrees 1.8.0, we are dropping support for old versions of PHP, which means we can now use some modern HTTP and image-handling libraries, so this feature may be added in the future.
If I contribute a solution, would you prefer it use any particular library?
A solution I considered was to add in a hook so that when Media is retrieved:
In this way, data is only fetched from an external source only when the picture is attempted to be viewed.
Another solution would be to add a button to "Fetch remote media", which would follow all Media links in the DB to cache locally, overwriting the cache so long as media still existed at the remote location (if if a 40x or 50x error, then leave cache alone). The problem i see here is it's more involved (adding a button) and at risk of getting rate limited by destination (ie myheritageimages.com).
Thoughts?
Thoughts?
If we are going to fetch the remote file to create a thumbnail, then we may as well update the OBJE record to point to the new/local image file.
Linked images are now used as their own thumbnails.
I had the same symptoms, different problem. My THUMBNAIL_WIDTH had an empty value in it after PGV import.
I imported a GEDCOM from MyHeritage which includes media links to many photos. All of the links are full URLs like this: https://www.myheritageimages.com/G/storage/site145832171/files/50/04/96/500496_2277468l4b0f5862y7x765.jpg
However, none of these linked photos display for a user's profile thumbnail, nor for thumbnails in the Media tab of their individual.php page.
Any clues as to why? I can take a stab at fixing if an English description of why this happens is provided.