cloudinary-laravel icon indicating copy to clipboard operation
cloudinary-laravel copied to clipboard

more x-cld-image component attributes and destination folder parameter in attach media

Open Tressos-Aristomenis opened this issue 3 years ago • 2 comments

Hey, I have been struggling for hours and I still haven't found any solution with this one.

I can't find a way to add more attributes in x-cld-image. This is the component:

@php
 echo cloudinary()->getImageTag($publicId ?? '')->scale($width ?? '', $height ?? '')->serialize();
@endphp

Apparently, I can only add width and height but what if I want the image to be rounded? or change the file format?

Last but not least, I did $file->storeOnCloudinaryAs('logos', 'user_logo') to upload the file user_logo in the cloudinary folder logos and then I did $user->attachMedia($file) to attach the image to the specified user model. However, this resulted in having user_logo both in root cloudinary directory and in logos folder.

Maybe add another parameter to attachMedia , ie. folder so that we can choose destination folder for upload ?

Tressos-Aristomenis avatar Oct 14 '21 21:10 Tressos-Aristomenis

@Tressos-Aristomenis is this something you still need?

unicodeveloper avatar Jun 03 '22 12:06 unicodeveloper

It will be good if we can add attribute our own and it will merge into image tags Example

<x-cld-image public-id="{{$oldFeaturedImage->public_id}}" width="333" height="333" class="rounded-lg"></x-cld-image>

royrakesh avatar Dec 20 '22 13:12 royrakesh