I have a site that is mostly a photo gallery (built with Eleventy) that I am using Large Media with and transforms to use the correct size image. I would like to get the image’s width and height to use in the img tag where used in the template. Since I am using Git LFS for Netlify Large Media, Eleventy just sees the small pointer file, which isn’t really useful for this use case.
A few ideas I am considering:
- Have Eleventy/Node grab the image from the public URL and get the width and height that way. This would make the build time slower and just seems awkward.
- Could Netlify CMS’s image widget be used to get the width and height?
- Clone the repo I am working off of including the original files from Git LFS instead of the pointers. I would get the actual files, but would Netlify need do the same on it’s side?
- Is there something with Git LFS that I am missing where I could read the actual file? I am kinda new to LFS.
- Or something I am completely off target with?