Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

GRAV not producing srcset images, what am I doing wrong?

Started by Muut Archive 10 years ago · 3 replies · 382 views
10 years ago

Hello all,
Starting to dive deep into GRAV and I'm blown away with it thus far. Have an issue though with srcset images not being produced.
My Markdown is this:

TXT
![Intensive Logo](/images/01_Intensive-logo.jpg?lightbox=1200,800)

The output is this:
--- html
<a rel="lightbox" data-width="1200" data-height="800" href="/images/f/7/b/9/c/f7b9ccb9d6e4efaca0d7aab2cbc5d9c15000587c-4eb4a 77c83dc82ad3d60149cfa9d0fcd07996fa6-01intensive-logo3x.jpeg" data-srcset="/images/f/7/b/9/c/f7b9ccb9d6e4efaca0d7aab2cbc5d9c15000587 c-4eb4a77c83dc82ad3d60149cfa9d0fcd07996fa6-01intensive-logo3x.jpeg 850w, /images/f/0/2/0/5/f0205759a3d5ed66066b1cc084bdef2ad0addfc6-01intensive -logo3x.jpeg 2550w, /images/e/6/a/2/1/e6a215ea6247ab5894d788470d2f0fb375cde439-4f10289db8e b4f67636b083945f469b5afbd4347-01intensive-logo3x.jpeg 1700w"><img alt="Intensive Logo" src="/images/4/e/b/4/a/4eb4a77c83dc82ad3d60149cfa9d0fcd07996fa6-01inte nsive-logo3x.jpeg" srcset="/images/4/e/b/4/a/4eb4a77c83dc82ad3d60149cfa9d0fcd07996fa6-01i ntensive-logo3x-320.jpeg 320w, /images/4/e/b/4/a/4eb4a77c83dc82ad3d60149cfa9d0fc d07996fa6-01intensive -logo3x-480.jpeg 480w, /images/4/e/b/4/a/4eb4a77c83dc82ad3d60149cfa9d0fcd07996fa6-01intensive -logo3x-640.jpeg 640w, /images/4/e/b/4/a/4eb4a77c83dc82ad3d60149cfa9d0fcd07996fa6-01intensive -logo3x-960.jpeg 960w, /images/4/e/b/4/a/4eb4a77c83dc82ad3d60149cfa9d0fcd07996fa6-01intensive -logo3x-1280.jpeg 1280w, /images/4/e/b/4/a/4eb4a77c83dc82ad3d60149cfa9d0fcd07996fa6-01intensive -logo3x-1600.jpeg 1600w, /images/4/e/b/4/a/4eb4a77c83dc82ad3d60149cfa9d0fcd07996fa6-01intensive -logo3x-1920.jpeg 1920w, /images/4/e/b/4/a/4eb4a77c83dc82ad3d60149cfa9d0fcd07996fa6-01intensive -logo3x-2240.jpeg 2240w" sizes="100vw"></a>

TXT


The a href works, and so does the img src.
But checked out the paths 0n img srcset and the cached thumbnails aren't being created it seems.

What am I doing wrong?
Thanks in advance!
BR
10 years ago

BTW, this was with the Image Srcset Plug In. It's even worse with the Srcset fallback, as the srcsets come through as incomplete base64's then. It's like it's all almost there, but it's not. I want to help out and get it there b/c everything that works works awesome...

10 years ago

I replied in the issue on GitHub. Note that the ImgSrcSet-plugin does not try to leverage Grav's media caching mechanisms (it is unfit for handling the generation of many images from large images). Rather, it assumes that the images exist independently of Grav, and just generates the srcset-attribute.

For an example of how to generate these images with Node, see this gist.

10 years ago

Thanks OleVic. Still getting my head around things in GRAV. This was very helpful.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1362 9 years ago
Archive · by Muut Archive, 9 years ago
2 939 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2959 9 years ago
Archive · by Muut Archive, 9 years ago
3 1124 9 years ago