Open styfle opened 2 days ago
The Image Optimization API currently uses parseInt() for w and q query string parameters.
parseInt()
w
q
This doesn't handle floats as you might expect and instead coerces, for example parseInt('99.9') === 99.
parseInt('99.9') === 99
This PR changes the runtime to match the build time validation and only accept integers for w and q.
Commit: 527c88d9467e3baad627b71afc431136460dec8d
The Image Optimization API currently uses
parseInt()
forw
andq
query string parameters.This doesn't handle floats as you might expect and instead coerces, for example
parseInt('99.9') === 99
.This PR changes the runtime to match the build time validation and only accept integers for
w
andq
.