Skip to content

Cloudflare example? #805

Description

@Ic3m4n34

Can someone provide a complete Cloudflare images example? No matter what I do, I can't get it to work.

nuxt.config.ts

image: {
    domains: ['imagedelivery.net'],
    cloudflare: {
      baseURL: 'https://imagedelivery.net/<my-id>/',
    },
  },

When I use it like this:

<nuxt-img
        provider="cloudflare"
        src="rib-eye-steak-medium-rare.webp"
        height="300"
        :modifiers="{ fit: 'contain' }"
/>

this is what URL is requested: https://imagedelivery.net/<my-id>/cdn-cgi/image/w=1536,f=webp/rib-eye-steak-medium-rare.webp.

First: Where are the parameters like (w=1536) are coming from? Am I missing something here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions