image icon indicating copy to clipboard operation
image copied to clipboard

Feat/static generation

Open jimhlad opened this issue 3 years ago • 1 comments

This is a modified version of @pi0 's PR for static image generation (took the heavy lifting from there).

Would be interested to get a second pair of eyes from @danielroe or someone on the Nuxt team.

P.S. Not sure if creating a separate PR was the best approach. Feel free to close this out if it's way off the mark or if modifying the original PR is easier. Thanks!

jimhlad avatar Oct 08 '22 16:10 jimhlad

Deploy request for nuxt-image-v1 pending review.

Visit the deploys page to approve it

Name Link
Latest commit bcd2b741e738f4227f1ce734bb462d34e12802e3

netlify[bot] avatar Oct 08 '22 16:10 netlify[bot]

Updated to address issue outlined here: https://github.com/nuxt/image/pull/614#issuecomment-1299377666

jimhlad avatar Nov 02 '22 00:11 jimhlad

Updated to fix issue with srcset image generation

jimhlad avatar Nov 02 '22 23:11 jimhlad

This works great. Please merge asap

husayt avatar Nov 16 '22 01:11 husayt

Given that #614 has seen some activity today by @pi0 , which one should be merged?

brunodeangelis avatar Nov 23 '22 22:11 brunodeangelis

Thanks for your work on this @jimhlad please keep doing this ❤️ For now, I went with #614 solution.

pi0 avatar Nov 24 '22 11:11 pi0

Thanks @pi0 .

Does it work with multiple formatters at the same time though (e.g. width, height and quality)?

I recall I had to add trim() here to fix something (I forget what it was though):

...(sizes.value.srcset || '').split(',').map(s => s.trim().split(' ')[0])

Also had some issues using process in the <nuxt-img> component. But maybe fixed now 😄

jimhlad avatar Nov 24 '22 12:11 jimhlad

Feel free to open PR for other issues ❤️

pi0 avatar Nov 24 '22 13:11 pi0