Piwigo only generates size "Large" when someone needs it. Unless an administrator explicitely asks to generate all sizes with the batch manager.
If ext_imagick is faster and can be used. (per comments above)
Why do multiple requests appear to come from Piwigo for conversions to ext_magick as per the logs.
For a "Square", "Thumbnail", "Medium", "Large" generate multiple images request. There appears to be four requests for the file and four outputs.
Why not one request and four outputs?
1 in 2 out sample request
Example: magick input.jpg \( -clone 0 -resize 100x100 -write thumb.jpg \) \( -clone 0 -resize 800x800 -write large.jpg \) null:
K910
Amazing stats, hope my add-on to TrueNAS as a plugin helped a bit too :)
Thanks for the explanation @plg !
henker wrote:
- how are the thumbnails generated then, by libgd ? I used Imagick and sure have generated thumbnails ?
There is a mistake in the original message that I didn't catch. Imagick can generate thumbnails. What Imagick can't generate is "previews" for PDF or HEIC. I fixed the original message. Thank you for the report.
henker wrote:
Is it really worth allowing the "exec" function for ext_imagick ? What are the benefits ?
So, here we have a fight of "External ImageMagick" (ext_imagick) Vs "ImageMagick wrapped with PHP" (imagick).
1) ext_imagick is more optimised, should be faster for big files
2) ext_imagick uses its own memory, does not rely on PHP memory_limit
3) ext_imagick is the direct use, no need to have the "PHP wrapper" up-to-date. Sometimes it's better to talk directly with the creator and not with someone who sell what the creator has created.
4) imagick does not require the "exec" function, which is sometimes disabled by hosting providers
5) imagick does not need the command line ImageMagick to be installed, only the lib
In order to make the right choice, I give you this information: we have been forcing the use of ext_imagick on Piwigo.com for the last 15 years.
Sorry for my ignorance, but regarding
- Or via Imagick, a PHP extension that “wraps” ImageMagick—but cannot generate thumbnails…
- how are the thumbnails generated then, by libgd ? I used Imagick and sure have generated thumbnails ?
Is it really worth allowing the "exec" function for ext_imagick ? What are the benefits ?
cdm wrote:
It would be useful to see a graph of number of images in installations
I filter on what I consider "active" installations.
MariaDB [piwigo_site]> select
if(nb_photos<1000, "(a) <1k", if(nb_photos<10000, "(b) 1k to 10k", if(nb_photos<100000, "(c) 10k to 100k", "(d) >100k"))) as nb_photos_range,
count(*)
from installs
where last_contact_on > subdate(now(), interval 30 day) and nb_contacts > 1
and nb_photos > 10
and installed_on < subdate(now(), interval 6 month)
group by nb_photos_range
;
+-----------------+----------+
| nb_photos_range | count(*) |
+-----------------+----------+
| (a) <1k | 5213 | => 37%
| (b) 1k to 10k | 5796 | => 41%
| (c) 10k to 100k | 2876 | => 20%
| (d) >100k | 242 | => 2%
+-----------------+----------+
4 rows in set (0.091 sec)I have chosen the ranges arbitrarily. Tell me if you want narrower ranges.
... and of other file types such as PDF and MP4.
I'm going to prepare that, it's a bit more complicated but we have the data.
It would be useful to see a graph of number of images in installations, and of other file types such as PDF and MP4.
Great to see so many using Community. That one is kinda vital for my albums.
Mine: Graphics Library: ImageMagick ImageMagick 7.1.1-43
In my case most is from jpg, png and normal image files, so I do not really see the point in using something else, if I even do, also:
- ImageMagick
- Imagick
- ext_imagick
Bit confusing.
Thanks for the transparancy
It worked, now it says "External ImageMagick 6.9.13-22". Thanks a lot!
Simon wrote:
How can I check whether my installation uses Imagick or Imagemagick
When it uses ImageMagick, your page [Administration > Maintenance > Environment] says :
Graphics Library: External ImageMagick 6.9.11-60
The "External" is explicit. So you're not using it. You can force Piwigo to try "External ImageMagick" instead. In your local configuration (edit it with LocalFiles Editor), add :
$conf['graphics_library'] = 'ext_imagick';
Then go back to [Administration > Maintenance > Environment] and see if Piwigo was able to switch to "External ..."
Great insights, thanks!
How can I check whether my installation uses Imagick or Imagemagick, and if it uses imagick, how can I change it? My piwigo tells me that my graphics library is "ImageMagick ImageMagick 6.9.13-22".
The best.
MariaDB [piwigo_site]> select substr(php_version, 1, 3) as php_branch, count(*) from installs where piwigo_version like '15.%' group by php_branch order by php_branch asc; +------------+----------+ | php_branch | count(*) | +------------+----------+ | 5.6 | 2 | | 7.0 | 97 | | 7.1 | 249 | | 7.2 | 455 | | 7.3 | 891 | | 7.4 | 5264 | | 8.0 | 1554 | | 8.1 | 7916 | | 8.2 | 9579 | | 8.3 | 12878 | | 8.4 | 741 | +------------+----------+ 11 rows in set (0.105 sec)