You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we cannot use <Image> component without depending on image services (Cloudflare images, etc).
Describe the solution you'd like
Using wasm-image-optimization, we can optimize (resize, convert to other formats i.e. webp) images which will be similar to what Next.js does using Sharp. We can simply do this by replacing Next.js' internal api endpoint /_next/image with our custom api with same behaviour using wasm-image-optimization (as an alternative to Sharp).
Describe alternatives you've considered
I am currently using service bindings to achieve this.
First thing to note that the size of latest version of wasm-image-optimization (v1.1.2, when I am writing this) is too large (~5026.63 KiB / gzip: ~1575.80 KiB), therefore we need to use v1.0.4 (since it is lightweight (~2470.85 KiB / gzip: ~771.76 KiB) and contains everything we need except for avif format output) to make sure we can deploy apps with image serving on Workers free plan.
Second thing to note that when I was using it, It was not able to transform large images. I guess this is because of Cloudflare Worker's memory limit. So, we need to handle this as well.
@opennextjs/cloudflare version
0.2.1
Additional context
No response
Before submitting
I have checked that there isn't already a similar feature request
This is a single feature (not multiple features in one request)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
Currently, we cannot use
<Image>
component without depending on image services (Cloudflare images, etc).Describe the solution you'd like
Using wasm-image-optimization, we can optimize (resize, convert to other formats i.e. webp) images which will be similar to what Next.js does using Sharp. We can simply do this by replacing Next.js' internal api endpoint
/_next/image
with our custom api with same behaviour using wasm-image-optimization (as an alternative to Sharp).Describe alternatives you've considered
I am currently using service bindings to achieve this.
First thing to note that the size of latest version of wasm-image-optimization (
v1.1.2
, when I am writing this) is too large (~5026.63 KiB
/ gzip:~1575.80 KiB
), therefore we need to usev1.0.4
(since it is lightweight (~2470.85 KiB
/ gzip:~771.76 KiB
) and contains everything we need except foravif
format output) to make sure we can deploy apps with image serving on Workers free plan.Second thing to note that when I was using it, It was not able to transform large images. I guess this is because of Cloudflare Worker's memory limit. So, we need to handle this as well.
@opennextjs/cloudflare version
0.2.1
Additional context
No response
Before submitting
The text was updated successfully, but these errors were encountered: