Skip to content

How to use autojpg() filter on a cloudfront request ? #478

Description

@aligajani

I basically want to add a filter:autojpg() to this and I have tried various combinations, but to no avail.

The PNG never converts to JPG. Any help would be appreciated. Thank you.

const cloudifyUrl = (uuid, width = 500, height = 500) => {
    const imageRequest = JSON.stringify({
        bucket: process.env.NEXT_PUBLIC_BUCKET_NAME,
        key: uuid,
        edits: {
            resize: {
                width,
                height,
                fit: 'cover',
            },
        },
    });
    return `${process.env.NEXT_PUBLIC_CLOUDFRONT_URL}/${btoa(imageRequest)}`;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions