Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Tressos-Aristomenis opened this issue Oct 14, 2021 · 2 comments
Labels
hacktoberfest help wanted Extra attention is needed

Comments

@Tressos-Aristomenis
Copy link

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 Tressos-Aristomenis changed the title more blade component attributes and destination folder parameter in attach media more x-cld-image component attributes and destination folder parameter in attach media Oct 14, 2021
@unicodeveloper
Copy link
Collaborator

@Tressos-Aristomenis is this something you still need?

@royrakesh
Copy link

royrakesh commented Dec 20, 2022

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>

@unicodeveloper unicodeveloper added help wanted Extra attention is needed hacktoberfest labels Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants