Questions tagged [laravel-medialibrary]

Laravel-medialibrary is a popular Laravel package to associate media files with eloquent ORM models

Useful links:

105 questions
0
votes
0 answers

I can not delete medialibrary files from storage in boot of model?

In laravel 8 app I with spatie/laravel-medialibrary 9 I want to delete file from storage when I delete parent model with boot method, like
mstdmstd
  • 2,195
  • 17
  • 63
  • 140
0
votes
1 answer

Problem storing laravel-medialibrary-pro media to AWS S3

I feel like I must be missing something very simple but I've lost track of everything I've tried over the past 3 days... I'm using medialibrary-pro for the temporary upload functionality on attachment to upload direct to S3. First, my…
Lane
  • 11
  • 5
0
votes
0 answers

File not uploading when validation with form requests in Laravel

Description Hi guys, I have a API endpoint, and im validation incoming data with form requests, It validated correctly but when i requesting file it says file doesn't exists. Code controller method public function store(StoreRequest $request) { …
Nima Tf
  • 61
  • 1
  • 8
0
votes
1 answer

how to retrive Spatia media collection in custom resource in laravel?

i am using Spatie media package in laravel, when i try to display media in Spatie collection is show defualt data from package . Controller : public function index(IndexTicketRequest $request) { $tickets =…
0
votes
0 answers

Uploaded images store in single image folder in Laravel Spatie Medialibrary

Laravel Spatie Medialibrary in storing image in every time create new folder. i want storage/image folder in all image. mycode now i want this type
0
votes
1 answer

Docker PHP-FPM Call to undefined function Intervention\Image\Gd\imagejpeg()

That's my dockerfile FROM php:7.4-fpm # Install GD RUN apt update \ && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev \ && docker-php-ext-configure gd \ && docker-php-ext-install -j$(nproc) pdo_mysql bcmath exif…
D3V1L
  • 145
  • 1
  • 1
  • 7
0
votes
1 answer

How to add multiple Media from Disk in Laravel Spatie Media Library?

I'm saving images from local disk to cloud (DO storage) disk by following codes in controller $claim->addMediaFromDisk($front_image, 'public')->usingFileName("front-image")->toMediaCollection('claim-images',…
Osman Rafi
  • 938
  • 1
  • 16
  • 37
0
votes
1 answer

Get media collection spatie media library using inertia js

I'm using Spatie media library and I can upload images to storage and database. And I'm trying to display a media collection in a Vue component. This is my Controller: public function showHotelPhoto($id) { $hotel = Hotel::with('media'); …
0
votes
1 answer

Laravel Livewire upload image using Media Library package

I am trying to fing how we can integrate Livewire with spatie/laravel-medialibrary in Laravel. In this code I can get the image information when user submit the form, but I can't save an uploaded image with spatie/laravel-medialibrary: class…
DolDurma
  • 15,753
  • 51
  • 198
  • 377
0
votes
0 answers

Laravel Spatie media library getFullUrl method not working inside the loop

I am developing API in laravel. When I try to fetch an uploaded image url inside a loop that gives me this error, Spatie\MediaLibrary\Exceptions\UrlCannotBeDetermined: Storage path myAppPath\storage\app is not part of public path myAppPath\public in…
0
votes
0 answers

Laravel Nova: Delete images from disk when content is modified and image is removed

I am working with spatie media library to store my images. On the frontend site I am using Quill editor with Vue js to give users the option to modify their posts. The users on the frontend also have the option to upload images. Those images get…
Jan
  • 1,180
  • 3
  • 23
  • 60
0
votes
1 answer

Prevent generating oversized media in spatie media library

I am using Spatie media library to manage media in my laravel app. The issue is it generates oversized images even if the uploaded file is small which results in pixelated images.
Ahu Son
  • 155
  • 2
  • 13
0
votes
1 answer

How can I save uploaded image using Laravel Spatie medialibrary v9?

I'm trying to save my uploaded file using Spatie's media libray (v9) and somehow I can't persist the image in my media table and my storage folder. When i dd() the request it finds the file and every information it needs, what am I missing ? Here is…
ABCrafty
  • 278
  • 1
  • 3
  • 16
0
votes
1 answer

laravel-medailibrary getFirstMediaUrl("images") not work for joined tables

I have a problem getting media from a joined table in laravel-medailibrary, I used getFirstMediaUrl("images") to get photos from one table and it works, but if I join two or three tables it not work, how can I solve it? I want to get photos from…
Zia Yamin
  • 942
  • 2
  • 10
  • 34
0
votes
2 answers

Laravel - Spatie Medial Library

In my Laravel 5.8 project I'm using Spatie Media Library plugin for my images. Now I want to use Intervention Image plugin to for some resizing and cropping. So this is a part of my code: if ($request->input('thumbnail', false)) { …
Milos
  • 552
  • 2
  • 7
  • 32