GetPublii / Publii

The most intuitive Static Site CMS designed for SEO-optimized and privacy-focused websites.
https://getpublii.com
GNU General Public License v3.0
6.21k stars 416 forks source link

[Feature Request]: Use sharp compression for creating webp pictures on Linux System #1207

Open pagenstedt opened 1 year ago

pagenstedt commented 1 year ago

Feature Description

It seems, publii is not able to use sharp engine on Linux, whether sharp libraries are installed or not. What is the problem here, and will it be fixed one day?

dziudek commented 1 year ago

Hi,

Are you using the latest version of Publii? (v.0.42.1)

Sharp is supported on Linux again for over 1 year: https://github.com/GetPublii/Publii/commit/e781c71b781f1af9baf3cdd75ad313dcef3d2ad1

pagenstedt commented 1 year ago

It seems I do use Version: 0.42.1 (build 16233) Attached the notice I am seeing. https://ibb.co/xDDg4ns Sharp works, error only for generating webp.

dziudek commented 1 year ago

Please check if you have anything under Tools -> Log viewer -> regenerate-errors.log

s3nnet commented 1 year ago

I've been using Sharp on Linux without any issues for a while now. Webp support (also for Featured Images) included. Just have to select Sharp in App setting, I guess.

bsbhadwal commented 1 year ago

having the same problem while choosing sharp regeneration engine. It starts the regeneration process but hangs at a certain percentage (1-7%) Jimp is slow but works. System fedora 38 Publii Version: 0.42.1 (build 16233)

Error in regenerate-errors.log screenshot attached Screenshot from 2023-05-16 16-09-11 Screenshot from 2023-05-16 16-15-48 Screenshot from 2023-05-16 16-16-48

dziudek commented 1 year ago

@bsbhadwal - usually such problems occur when image contains some metadata or format which is not supported by sharp library. Most probably one of your images is incorrect for sharp and it causes this error.

I will try to implement code changes which will handle such errors more gracefully.

bsbhadwal commented 1 year ago

I will try to implement code changes which will handle such errors more gracefully.

Thank you. Since this is a batch process, I would recommend ignoring images that fail, logging them and moving to the next one.

The needs of the many outweigh the needs of the few or the one (image)

chrisHRD commented 1 year ago

Even after stripping a JPG, PNG, and WEBp of all metadata. I am unable to upload any media to Publii.

System: Fedora KDE 38 Publii: Version: 0.42.1 (build 16233) Webp: Turned on Resizer: Sharp Error: (process:16276): GLib-GObject-CRITICAL **: 12:42:23.692: g_object_unref: assertion 'G_IS_OBJECT (object)' failed ** ERROR:../vendor/8.13.3/linux-x64/include/vips/VImage8.h:159:vips::VObject::~VObject(): assertion failed: (!vobject || VIPS_IS_OBJECT( vobject )) Bail out! ERROR:../vendor/8.13.3/linux-x64/include/vips/VImage8.h:159:vips::VObject::~VObject(): assertion failed: (!vobject || VIPS_IS_OBJECT( vobject ))