Skip to content

Hygraph provider produces broken URLs when no transformation is requested #1998

@screeny05

Description

@screeny05

Description

When using the hygraph-provider to show images, providing no transformations will return a broken image URL, resulting in the image not being displayed at all.

Reproduction

Stackblitz minimal reproduction

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nuxt/image'],
  image: {
    hygraph: {
      baseURL: 'https://eu-west-2.graphassets.com/cma6x4vl1007901w50aelaqrj',
    },
  },
});
<template>
  <div>
    <NuxtImg
      src="https://eu-west-2.graphassets.com/cma6x4vl1007901w50aelaqrj/aMvQyQbdSk6obGfhMJJG"
      provider="hygraph"
    />
  </div>
</template>
  • Resulting URL: https://eu-west-2.graphassets.com/cma6x4vl1007901w50aelaqrj/resize=/auto_image/aMvQyQbdSk6obGfhMJJG
  • Expected URL: https://eu-west-2.graphassets.com/cma6x4vl1007901w50aelaqrj/auto_image/aMvQyQbdSk6obGfhMJJG

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions