How to link to image present in Large Media

My netlify sitename is “shubhodev-test”. I am just testing my new domain which I am still setting up. I set up Large Media on the site.

> netlify lm:info
  ✔ Checking Git version [Git-120)]
  ✔ Checking Git LFS version [2.7.2]
  ✔ Checking Git LFS filters
  ✔ Checking Netlify's Git Credentials version [0.1.8]

The plugin is setup. The Git LFS and netlify CLI version is correct.
This is my repo https://github.com/shubhojyoti/shubho.dev-gatsby

I can see the sample image uploaded in Large Media tab on my netlify site dashboard. So the image has been uploaded (I think?).

This is a gatsby deployment so image is at /static/images/uploads/windmills.job. So in my homepage I used <img src="/images/uploads/windmills.jpg?nf_resize=smartcrop&w=100" alt="testing" />. This should show the image correctly right? Or do I need to do some other wizardry to make this work? Appreciate any help.

Almost there! On localhost, you need to point your images at the absolute path to make the transformations work: <img src="https://www.yoursite.com/images/uploads/windmills.jpg?nf_resize=smartcrop&w=100" alt="testing" />

-edit-
I took a look at your repo, you still have actual images there. I think you forgot to specify which images to track: https://www.netlify.com/docs/large-media/#large-media-file-tracking-configuration

2 Likes

Thank you, that worked. It never occured to me to specify the full path :slight_smile:

Regarding my repo, I am only tracking the images at static/images/uploads folder.