#<Image> Quality
1 messages · Page 1 of 1 (latest)
Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain specific information on how to enforce restrictions on the quality settings of an image in Next.js via middleware or API routes.
However, in Next.js, the quality of an optimized image is an integer between 1 and 100, where 100 is the best quality and therefore the largest file size. It defaults to 75. This is set using the quality prop in the <Image> component.
Here is an example of how it's used:
<Image src="/path/to/image.jpg" quality={75} />
In this case, the quality is set to 75. You can replace 75 with any integer between 1 and 100.