Closed RahulBirCodes closed 4 months ago
If i understood you correctly, can you check the usage of wildcard in the signing policy? It allows you to use the same signature with all variants of an image (independently from the the query string parameters)
Yeah that's what I ended up using, missed that in the docs the first time. Thanks!
Hi!
So in my cloudfront distro, I set cache behaviors so that certain paths to resources in my bucket are protected; however, Im having the following problem now: I can only sign the urls after the query params are added but the next image component adds the query param to the final url I send to the image in the loader. I looked into presigned cookies however for my use case i need to have fine control over individual resource access and each cookie only allows me to provide one resource in its policy. Now Im thinking that I need to create a custom image component that determines the quality and width and then sends a request to my server to generate a signed url with those params to use. Only thing is, I would give up all the default behavior of the Next image component and would likely have to rewrite most of those features myself in this implementation. Is there any other way i could go about this?