Open siavashvj opened 8 months ago
I'll have to dig in here.
If anyone has any ideas on fixes please let me know!
Hi,
You can disable them either on a per image basis by passing the 'unoptimized' prop to the Image tag.
Or completely disable optimisations by adding the below to the next.config.js file:
module.exports = {
images: {
unoptimized: true,
},
};
Information found here: https://vercel.com/docs/image-optimization/managing-image-optimization-costs
I believe this is due to the (I suspect) cache bust query param in the image src in profile-settings.tsx
:
src={profile.image_url + "?" + new Date().getTime()}
This is a suggested optimisation in the Vercel docs (https://vercel.com/docs/image-optimization/managing-image-optimization-costs):
"To reduce your Image Optimization usage, you should consider the following:
Reduce variability in query string parameters for src prop and minimize the amount of times you change the src property during a billing period"
I'm guessing this particular issue will disappear if that query param is removed, but I suspect @mckaywrigley hade a reason for adding this to fix another issue, perhaps? :)
I got a congrats letter on using up all imaging processing. Just with a few avatar icons.
I got a congrats letter on using up all imaging processing. Just with a few avatar icons.
Me too. And a $50 charge!
Our stage env for this on Vercel warned that we've used up our 5000 image optimization processes for the month despite only having 2 test users with very little activity. Checking further, it seems over 5000 image optimizations of one single profile image, over and over again.
Here's a snippet from the 5000 line long log of optimized images; all leads to the same image.