cloudinary / js-url-gen

Cloudinary's base javascript library, including URL generation.
https://www.cloudinary.com
MIT License
47 stars 9 forks source link

why image file extention removed? #600

Open epubreader opened 2 months ago

epubreader commented 2 months ago

why image file extension removed when I use cloudinary react? but nodejs api contains file extension, for example ".jpg"

`export default function AvatarImage({ photo, width, height }) {

const { public_id: publicId, version } = photo;
const cloudinaryImage = cld.image(publicId);

cloudinaryImage
    .resize(scale().width(width).height(height));

return (
    <AdvancedImage cldImg={cloudinaryImage} width={width}
        height={height}
        alt={`Image ${publicId}`} />
);

}`

dannyv-cloudinary commented 2 months ago

Hey @epubreader. What are you passing the public ID in each instance? As per our documentation, the file extension is actually a separate parameter, and doesn't include the extension.