Publii icon indicating copy to clipboard operation
Publii copied to clipboard

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

Open pagenstedt opened this issue 1 year ago • 8 comments

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?

pagenstedt avatar May 09 '23 14:05 pagenstedt

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

dziudek avatar May 09 '23 17:05 dziudek

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.

pagenstedt avatar May 09 '23 18:05 pagenstedt

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

dziudek avatar May 09 '23 18:05 dziudek

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.

s3nnet avatar May 12 '23 16:05 s3nnet

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

bsbhadwal avatar May 16 '23 10:05 bsbhadwal

@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.

dziudek avatar May 16 '23 17:05 dziudek

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)

bsbhadwal avatar May 19 '23 05:05 bsbhadwal

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 ))

chrisHRD avatar Jul 07 '23 17:07 chrisHRD