Replies: 3 comments
-
I have the same problem. I tried the GD and Imagick image drivers, with Imagick the image is manipulated and the watermark is applied but the opacity effect is not. laravel v8.33.1 |
Beta Was this translation helpful? Give feedback.
-
I am also having the same problem. Here's the data from Horizon: Job Data{
"deleteWhenMissingModels": true,
"conversions": {
"items": [
{
"name": "default",
"fileNamer": {
},
"extractVideoFrameAtSecond": 0,
"manipulations": {
"manipulationSequence": {
"groups": [
{
"optimize": "[]",
"format": "jpg",
"width": "1000",
"height": "1000",
"fit": "max",
"watermark": "/home/forge/deployments/mydomain.com/2021_04_22_160557/storage/app/logo.png",
"watermarkOpacity": "50",
"watermarkPaddingX": "10",
"watermarkPaddingY": "10"
}
]
}
},
"performOnCollections": [
],
"performOnQueue": true,
"keepOriginalImageFormat": false,
"generateResponsiveImages": true,
"loadingAttributeValue": null,
"pdfPageNumber": 1
},
{
"name": "150x150",
"fileNamer": {
},
"extractVideoFrameAtSecond": 0,
"manipulations": {
"manipulationSequence": {
"groups": [
{
"optimize": "{\"Spatie\\ImageOptimizer\\Optimizers\\Jpegoptim\":[\"-m85\",\"--strip-all\",\"--all-progressive\"],\"Spatie\\ImageOptimizer\\Optimizers\\Pngquant\":[\"--force\"],\"Spatie\\ImageOptimizer\\Optimizers\\Optipng\":[\"-i0\",\"-o2\",\"-quiet\"],\"Spatie\\ImageOptimizer\\Optimizers\\Svgo\":[\"--disable=cleanupIDs\"],\"Spatie\\ImageOptimizer\\Optimizers\\Gifsicle\":[\"-b\",\"-O3\"],\"Spatie\\ImageOptimizer\\Optimizers\\Cwebp\":[\"-m 6\",\"-pass 10\",\"-mt\",\"-q 90\"]}",
"format": "jpg",
"width": "150",
"height": "150",
"fit": "max"
}
]
}
},
"performOnCollections": [
],
"performOnQueue": true,
"keepOriginalImageFormat": false,
"generateResponsiveImages": false,
"loadingAttributeValue": null,
"pdfPageNumber": 1
}
]
},
"media": {
"class": "Spatie\MediaLibrary\MediaCollections\Models\Media",
"id": 73527,
"relations": [
],
"connection": "mysql"
},
"onlyMissing": false,
"job": null,
"connection": null,
"queue": "media",
"chainConnection": null,
"chainQueue": null,
"chainCatchCallbacks": null,
"delay": null,
"afterCommit": null,
"middleware": [
],
"chained": [
]
} PHP 8.0.3 Using GD image library. I haven't tried Imagick. I also use opacity on my watermark, so if Imagick can't do opacity for the watermark, it won't be a solution. Edit: Switched to Imagick and it seems to be fine. I'm not sure why @BaDcereal's watermark opacity was not applied. Here's how I implemented it: /**
* Register the media conversions.
*
* @throws \Spatie\Image\Exceptions\InvalidManipulation
* @throws \League\Flysystem\FileNotFoundException
*/
public function registerMediaConversions(Media $media = null): void
{
$this->addMediaConversion('default')
->fit(Manipulations::FIT_MAX, 1000, 1000)
->optimize()
->watermark(storage_path('app/logo.png'))
->watermarkOpacity(50)
->watermarkPadding(10)
->withResponsiveImages();
$this->addMediaConversion('150x150')->fit(Manipulations::FIT_MAX, 150, 150);
} |
Beta Was this translation helpful? Give feedback.
-
This has been reported in Intervention/image#1080 |
Beta Was this translation helpful? Give feedback.
-
laravel 8
php 8
spatie/laravel-medialibrary": "^9.0.0",
When using watermark it gives me an error : Image source not readable
model :
error :
Intervention\Image\Exception\NotReadableException
Image source not readable
Intervention\Image\AbstractDecoder::init
C:\xampp\htdocs\company\vendor\intervention\image\src\Intervention\Image\AbstractDecoder.php:346
Beta Was this translation helpful? Give feedback.
All reactions