I enabled Netlify LFS and stored my pictures in it. It’s served on the website but I can’t make work the media transformation on my website. It’s weird because, when I go on the website, the pictures are displayed like they are not transformed. But when I type the media URL and access directly the file, the transformation is made. I have absolutely no clue on what’s going on.
Hi, @clawfire. It is working for some images and not for others. This is happening because some images are stored in Large Media and others are not. Here is an example of an image using Large Media and where image transformations are working:
It looks like wildcard was interpreted as the part of the actual file name. The solution in this case will be to add the images to Git LFS tracking. There is more information about how to do this here:
Once you are sure the images are being tracked by Git LFS, you can force them to be uploaded to Large Media using this:
git lfs push --all origin
The final step will be to make a new deploy (some change and git push to trigger a build) and the images should then be correctly tracked by Large Media. Once this is done the image transformations will work.
If this doesn’t work as promised or if there are any questions, please let us know.
I gonna call PEBKAC on this one. I use an incorrect glob: img/**.{png,jpg,jpeg} which then only take pictures at the root of the img folder.
I should use something like img/**/**.{png,jpg,jpeg in fact.
But now I got an error trying to run git lfs push --all origin :
Error reading git config: Error running /usr/local/Cellar/git/2.23.0_1/libexec/git-core/git 'config' '-l' '-f' '/Users/thibault/Projets/thibaultmilan.com/.lfsconfig': 'fatal: ligne 1 de config incorrecte dans le fichier /Users/thibault/Projets/thibaultmilan.com/.lfsconfig' 'exit status 128'
Remote "origin" does not support the LFS locking API. Consider disabling it with:
$ git config lfs.origin.git/info/lfs.locksverify false
Uploading LFS objects: 0% (0/1), 0 B | 0 B/s
ok weird. My git-credential-netlify where outdated.
I run brew upgrade netlify/git-credential-netlify/git-credential-netlify
I remove the .lsfconfig from my working copy
I run netlify lm:setup again to re-create it. The sha is different. weird.
Uploading seems to start then …
Authentication required: Authorization error: https://475d9066-7ec4-4ac4-a1da-b80a61a9daa3.netlify.app/.netlify/large-media/verify
Check that you have proper access to the repository