next-img – a plugin for embedding optimized images #13947
Unanswered
KidkArolis
asked this question in
Show and tell
Replies: 1 comment
-
That's great, I'll definetly take a look! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi 👋,
I've been working on and off over the past month on a plugin for making it easier to add images to Next.js projects.
Adding images to websites these days is a little on the tricky side. You need to take into account the performance, different screen sizes, different screen densities, modern image formats, and size it all just right to fit into the specific designs. I wanted to automate this better.
next-img
is a:all in one.
You just point it at an image, specify required sizes and it will produce:
For example, it will turn:
into:
One of my favorite aspects of this plugin is the persistent caching. Image processing is slow. Doing that on every
next
startup ornext build
is not ideal. Therefore,next-img
caches all of the processed images in the git repo to avoid any reprocessing when developing / deploying the project in the future.Docs in the repo: https://github.com/humaans/next-img/
Examples: https://humaans.github.io/next-img/
I hope you find this useful 🙏
Beta Was this translation helpful? Give feedback.
All reactions