Hi,
I have a problem with Large Media. Im trying to use it on netlify cms and Hugo.
All configuration is created by following netlify cms and netlify documentation. When I upload files manually to git, by pushing files, my images are uploaded, and I can see them in LM tab in the netlify dashboard. The problem is, I can’t see them in netlify cms. There is only blob files in the media view, and all uploads created from cms are sended directly to github repository as regular files.
When I’m trying to use some photo in my Hugo page, there is a problem during build I think, because all addresses to photos will change to something like this: https://d33wubrfki0l68.cloudfront.net/43ad412b49b4dfd7deab10b1a8d30001a45d7c83/ea1e3/images/mateusz.jpg
my netlify cms config:
backend:
name: git-gateway
branch: master # Branch to update (optional; defaults to master)
media_folder: static/images
public_folder: /images
Hi @mtk3d, welcome to the community
The way the CMS works with Large Media is by trying to read the .lfsconfig and .gitattributes files from the repo, and using the content/existence of those files to detect large media.
Can you share your browser network traffic while loading the CMS (do a full refresh please)?
Specifically, you should see requests go out to these files.
Thanks!
Thanks for sharing it In that case the CMS should send a request to retrieve the media folder static/images content. Can see see that one (with the response)?
I think I was mistaken before and you actually need to open the media folder to see the requests for .lfsconfig and .gitattributes.
Thanks, I think we’re getting somewhere. Can you verify your CMS version as shown in the browser console logs?
The requests for .gitattributes and .lfsconfig should be the ones starting with 74f1 and f496 (the sha for those files in GitHub).
Does the responses for those make sense?
Yes those requests are correct, decoded content is valid, but still when I’m trying to upload images, they are saved directly in github repository, I can’t see them in Large Media in Netlify.
That’s very odd.
I’ve just tested on an example repo I have with similar configuration and the files shows up in GitHub correctly: https://github.com/erezrokah/netlify-cms-large-media/commit/e206c8153ff537f3d6069be71497954ebb02cebf
I have the same versions as you.
Can you share the requests when uploading a new image? Are there any console logs/errors? Are current images (uploaded with LFS) display correctly or broken? Are there no requests to .netlify/large-media paths at all?
Sorry for all the questions (and also if I’m asking something you’ve already mentioned) - I’m trying to be as clear as possible.
Also, can you post the full config.yml? Going to https://mateuszcholewka.pl/admin fails to load it.
I’m puzzled by this as if the CMS doesn’t detect large media it shouldn’t be able to show the current files. For large media it should read the pointer file then send a request to the large media service. Can you try deleting the browser cache just to be sure? If it’s displaying large media files there must be some requests to the large media service.
How are the existing files shown in GitHub? Similar to this?
Sorry, my mistake. You asked about displaying those photos in CMS, and I was talking about photos on the page. In CMS I can’t see those files correctly, here is the request for photos which are uploaded to Large Media by manual commit: