Spatie Media Library Conversion Quality NOT Applied
When I convert a PNG using the model method
->addMediaConversion()
the ->quality()
setting is ignored when combined with ->background('#ffffff')
This is problem for all PNGs with transparent backgrounds. You have to explicitly set the background or else it ends up black in the coverted jpegs.
I ran into this problem about 6 months ago...I ignored it. I just upgraded related composer packages and tried again. Still getting these results.
Can anybody offer and help? (Note: "works for me" comments are not necessary and counter-productive)
Thanks!4 Replies
Sounds like a bug in spatie’s package to me.
I upgraded my imagemagick in brew just now...still same error
For now I created a janky work around. I added a Spatie
ConversionHasBeenCompletedEvent
listener.
From there I re-create each conversion with proper jpeg compression
The simplified version looks like this:
fyi: there was talk about a related bug here:
https://github.com/spatie/laravel-medialibrary/issues/3502
@awcodes Adam, I was going to file a bug at https://github.com/filamentphp/spatie-laravel-media-library-plugin but it is READ ONLY.yea, i just don't think Filament is doing anything specific to that functionality, which makes me think it's something in the underlying package.
Roger that.
I'll post a bug at Spaties Github