I uploaded an 44x18px png image, file size 1.04KB. The image uploaded correctly but the responsiveImage srcSet is of the form https://www.datocms-assets.com/99106/1718013153-avid-light-blue.png 44w
. This produces an invalid image when displayed in html.
Hey @ifeanyi.dike,
Welcome to the DatoCMS forum! What are you trying to do, exactly? Can you please share some sample code?
A srcset
is generally meant to be used with responsive images: Responsive images - Learn web development | MDN, e.g.
If you only need one size, you should use the src
field instead of srcSet
. If you need to make that one image 44 pixels wide coming back from Imgix, you can either use the imgixParams
in GraphQL:
Or you can append Imgix URL parameters directly to the image URL, like https://www.datocms-assets.com/99106/1718013153-avid-light-blue.png?w=44
Does that help? If that doesnโt answer your question, could you please post some sample code (but the GraphQL or CMA data youโre fetching and your frontend code) and explain what youโre trying to do?
Thank you