Comments (7)
@timvandijck Any update regarding this fix?
from laravel-medialibrary.
This should be fixed in the latest version of the spatie/image package that is used by the medialibrary package.
from laravel-medialibrary.
Having the same problem since v11
Note that this only happens for me when using 'gd' as IMAGE_DRIVER
'imagick' renders the background transparent for the same file.
Don't know if related, but I'm also getting this error for my transparent files:
ErrorException imagecreatefromstring(): gd-png: libpng warning: iCCP: known incorrect sRGB profile
vendor/spatie/image/src/Drivers/Gd/GdDriver.php:88 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError
vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:255 Illuminate\Foundation\Bootstrap\HandleExceptions::Illuminate\Foundation\Bootstrap{closure}
[internal] imagecreatefromstring
vendor/spatie/image/src/Drivers/Gd/GdDriver.php:88 Spatie\Image\Drivers\Gd\GdDriver::loadFile
vendor/spatie/image/src/Image.php:49 Spatie\Image\Image::loadFile...
Versions
php -i | grep 'GD|ImageMagick'
GD Support => enabled
GD Version => bundled (2.1.0 compatible)
Imagick compiled with ImageMagick version => ImageMagick 7.1.0-52 Q16-HDRI x86_64 36d3408b5:20221106 https://imagemagick.org
Imagick using ImageMagick library version => ImageMagick 7.1.0-52 Q16-HDRI x86_64 36d3408b5:20221106 https://imagemagick.org
ImageMagick copyright => (C) 1999 ImageMagick Studio LLC
ImageMagick release date => 2022-11-06
spatie/image: 3.3.4
spatie/laravel-medialibrary: 11.0.5
from laravel-medialibrary.
@timvandijck I checked but still I am getting the black background with the latest spatie/image package. I was initially using webp
and the result is same. Tried with pngs to, and the result are with black background.
from laravel-medialibrary.
@langeuh So using imagick
as Image Driver solves this bug? Been waiting too long. I need this to be working asap. So can you please confirm.
Edit/Update:
Yes the 'imagick' driver has no issue with transparent images.
from laravel-medialibrary.
I checked with imagick
driver and its working correctly for pngs, but with webp, its the same issue.
from laravel-medialibrary.
@anuzpandey5 intresting, would you mind running the test in the spatie/image package?
vendor/bin/pest --filter "works with transparent pngs"
I'm curious if our differences in results are machine specific or if something else is causing it.
from laravel-medialibrary.
Related Issues (20)
- No upgrade guide to `medialibrary-pro` v5
- Calling toHtml on Media model doesn't return alt, unless defined via attributes
- image V3: Conversions tilting (some) images from portrait to landscape
- Call to a member function getMedia() on null in FileAdder.php when try return media collection after upload file for not exists model
- Media collections are lazy loaded with `preventLazyLoading()` enabled HOT 2
- addMediaFromDisk Method not defined when used in Queue Job
- When regenerating responsive images get wiped out.
- Broken link in UPGRADING,md, no instructions available for how to update conversions to new syntax. HOT 2
- Upgrade to 11: Custom optimizer ignored HOT 4
- Publishing the views is not working or not documented HOT 3
- php 8.3.4 + laravel-medialibrary 11.4.5: opcache+jit error: Only arrays and Traversables can be unpacked HOT 2
- Intervention\Image\Exception\NotReadableException: Unsupported image type application/x-empty. HOT 2
- Error when using withManipulations in combination with enumerations HOT 2
- Imagick driver works super slow with v11 HOT 3
- Changing file_name doesn't sync file on disk HOT 1
- uuid Data Type Compatibility Issue in Media Library Package Migration with MariaDB HOT 3
- Multiple Calls to registerMediaCollections Result in Duplicate Entries in mediaCollections Array HOT 1
- Too many connections Issue in Laravel Vapor when regenerating thumbnails
- Probably copying from MediaCollection to singleFile MediaCollection works weird HOT 2
- Herd/Valet SSL issue with addMediaFromUrl HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-medialibrary.