I am using spatie/media-library with my Laravel 8 project. In the model, I am writing a method to register a mediaCollection for a model. The issue I am facing is that during the conversion, the transparency is lost in the converted image.
How can I…
I'm new to this package since I usually use the image intervention. So the problem is whenever I save an image, it is saving in storage directory instead of in public directory. I tried to review the documentation and did some research and didn't…
I'm using the package spatie/laravel-medialibrary and I want to change the primaryKey on their modal called Media, without editing the package src file.
In my project, I'm using uuids as primary keys for all my models, so naturally, I want to do the…
This is my User Model
namespace App;
use Illuminate\Database\Eloquent\Model;
use Spatie\MediaLibrary\HasMedia\HasMedia;
use Spatie\MediaLibrary\HasMedia\HasMediaTrait;
use Spatie\MediaLibrary\File;
use…
I tried to integrate spatie media library with S3 and cloudfront. But I couldn't get the images to serve through cloudfront cdn.
Basically what I did was to set the AWS_URL to the Cloudfront url but when I check the image url it doesn't have the…
i just try to upload the image to the server using Spatie\MediaLibrary package .Then laravel gives this error of not found function. I tried all the solution no one worked
This is the code that i am using
> public function update(Request…
I'm using laravel spatie in my app. I have a problem.
When an user updates his list of image. Admin must to be approve a list of image which an user just update. If user add image, i just add more. But when an user change an image he had, how to do…
I'm using popular package spatie/laravel-medialibrary for associating files with models.
I was wondering if there is possibility add conversions on the fly, right before adding media to model.
I tried something like this, but it seems like…
i've practiced as it is in the spatie media library v8 documentation, but it doesn't work when i use base64 files.
In Controller:
$mediaFile = request('image');
$filename = 'abcd.jpeg';
$product =…
I have multiple disks set up within config/filesystems.php like so: I have recently added 'mealimages'.
'menus' => [
'driver' => 'local',
'root' => storage_path('app/menus'),
'url' => env('APP_URL').'/menu-store',
…
Uploading User profile photo & cover photo using Spatie Media Library on the AWS s3 bucket.I have set the s3 bucket policy to public and on \config\media-library.php i have set extra_headers [ 'ACL' => 'public-read' ].
So when I upload the images…
I'm trying to install spatie/laravel-medialibrary-pro:^2.0.0 but hitting the error "- spatie/laravel-medialibrary-pro 2.0.0 requires php ^8.0 which does not match your installed version 7.4.14."
My IDE is phpstorm which is using PHP 8.1.
My…
In laravel 9 with spatie/laravel-medialibrary 10 I tyry to make custom path for uploaded file
looking at docs : https://spatie.be/docs/laravel-medialibrary/v9/advanced-usage/using-a-custom-directory-structure
But making…
I'm using Laravel nova also the ClassicO\NovaMediaLibrary\MediaLibrary.
And with Laravel Nova I can use the help method like this:
Select::make('Option')
->options(
Post::active()
)->help(
…