Not sure if I'm missing something, but I can't get the PrismicImage component in Next.js to honour a specifed width for dynamic cropping / imgix manipulations.
The Next image, manipulated with the url works, while the PrismicImage ignores the width (I get width=2048 in the image url).
All other imgixParams seem to work ok - height is working, fit values are honoured, even stylizing with blur or duotone .... all good, but width is ignored (tried with w and width)...
Hi I am trying to use PrismicNextImage to handle all Prismic images in a Next.js v12 website. My component works fine and correctly handles images when using layout='fill' but some images need to have the width and height specified. When I try either 'width or height' or imgixParams={{ w: width, h:height }} I cannot control the size of the images.
Here is some of my .tsx component code for CustomImage.tsx:
I'm trying to get a full detailed response for you but quick answer: next/image manages an image’s size and w parameter. The width prop takes priority from what I remember, but I’ll need to double-check the code.