Imgix auto params

It seems like i can only choose one value for the auto params in graphQL responsive query while the imgix doc did said that “auto” params can can be combined. Some query like: auto=format,compress.
really help for performance .

hello @sangsangdt25 have you tried something like this:

responsiveImage(imgixParams: { auto: [compress,format] }) ?

1 Like

@mat_jack1 this combination does not seem to work. It returns auto64=Zm9ybWF0LGNvbXByZXNz which gives the same result as only setting compress.

Hello @devoorhoede

Can you send the link to the image in question with both imgix [compress, format] parameters applied, and one link with just compress applied?

@m.finamor yes:

@devoorhoede thank you!

The problem doesn’t seem to be the syntax as we are indeed sending both of the to imgix. A good way to test this would be to compare the image with just “compress” and with “[compress, enhance]” and you will see that adding more parameters like that does the correct imgix call, as the two images will be different.

It seems like in this specific image “format” is not having any effect because imgix couldn’t find any better ways to serve it:

@m.finamor Thanks for looking into this.

I can see enhance works as expected however passing only auto=format does result in avif (tested in latest version of Firefox), while the base64 result does return jpg.

More so if I construct the url manually I can get the desired result, a compressed avif like so:
https://www.datocms-assets.com/75287/1656234503-screen-full-1.jpg?auto=compress,format&dpr=0.25

@m.finamor to clarify, passing ?auto=compress,format to imgix works like expected giving a different result than the base64 from the graphql api. So this does seem like a bug?

Hello @devoorhoede, you’re right, i just managed to reproduce what you said locally :slight_smile: thank you for the explanation.

I’ve contacted the development team and soon as we get things sorted out with the imgix team i’ll get back to you.

Thank you for letting us know!

hi @devoorhoede

it was a bug from ourside. All imgix params have a base64 variant except auto and ch. Our code was setting the base64 variant for all params.

I’ve pushed the changes in production, but I have to purge your graphql queries (or your queries will still return an invalid auto64 param. Can you please send us the project URL? You can write that to support@datocms.com if you prefer :slight_smile:

Sorry for this and thanks for reporting!

1 Like