-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop delivery of WebP images #200
Comments
@martin Sorry for your inconvenience. Currently, there's a small bug related to what you explained. You can fix this one to the below source code, and then you can upload the rebuilt zip file to your Lambda function. getOutputFormat(event) {
const autoWebP = process.env.AUTO_WEBP;
if (autoWebP === 'Yes' && event.headers.Accept && event.headers.Accept.includes('image/webp')) {
return 'webp';
} else if (this.requestType === 'Default') {
const decoded = this.decodeRequest(event);
return decoded.outputFormat;
}
return null;
} Once again, I'm sorry to hear that you are experiencing the issue, and we will include the fix to the next release. |
@beomseoklee - I don't actually know how to fix this via the zip file. I installed this through the automated installer and I'm not actually super familiar with how to make changes? |
@adrienne I'll provide you the easiest way. You can update your stack with the below beta version which includes the fix and some other features. |
@beomseoklee I have the same issue, images are served as webp, I was able to force them to jpeg with "toFormat":"jpeg" parameter on edits and worked, but now I have also added "jpeg":{"quality":100,"chromaSubsampling":"4:4:4"} and I'm getting internal server error response. Here is my json config |
@walhallyus Do you have more specific logs on your CloudWatch logs? |
Thanks @beomseoklee. I run the beta template in a new stack. AutoWebP is disabled. But the response headers look like this:
The file command means it's a JPEG. So only the Content-Type is still wrong. With version v 4.1 i get the content-type image. |
@beomseoklee thanks. If we run off this stack can we update to the stable channel when it is released - quite seamlessly? |
@jcebuck If you have changed anything on your Lambda functions and you deploy the update, your Lambda functions source code would be replaced to the update, which means you would lose what you have customized, so you can re-apply them after updating as you mentioned. |
@martin Can you share the edits you used if it is possible to share? |
I have: |
@walhallyus Generally, 413 error is related to that your request or response body size is too big to process on Lambda. You can see the error code at here. Meanwhile, would you mind sharing the original image if it's possible so that I can see if it is really related to the payload size? |
@beomseoklee Interestingly, I'm getting the exact same error as @walhallyus Can you check this image for me please @beomseoklee if possible? Not sure how to check this. My question also is, why would the image affect payload size? It's grabbing from S3, right? I tried a 30MB JPG, and it worked like a charm. But when I use a 4MB PNG it returned 413. Your help is appreciated. |
@beomseoklee i have tested with large images and I get |
@walhallyus Do you get a 413 error or Does this also happen with small or normal sized images? |
@jcebuck if I use large images(40mb) I get If I use the image attached in my previous message I get |
We've added a workaround for |
Hi.
We are using the current template v4.2. When updating the stack we had temporarily activated the AutoWebP parameter.
But since we don't need this function, we deactivated it again. For this I clicked "update" and select "use current template", but in the next step I set "AutoWebP" to "No".
Nevertheless we still get images in WebP format. Can anyone confirm this behaviour? We have deleted the cache several times, the changeover is more than 3 days ago now. Any ideas?
The text was updated successfully, but these errors were encountered: