I am new to hugo, and am trying to use it to make a small personal website. As part of this I want to include photos in some of my posts. So far so simple.
I got this working with the standard markdown thing of
![alttext](filename.jpg)
Which is great, but given it looks like hugo can do so much more I jumped into a rabbit hole.
Laura Kalbag’s post about responsive imaging has been great. I now get a photo that changes size with browser window etc…
But I think I have misunderstood how the image processing subsystem works. My original photo is about 7MB. Which is big to be delivering to a website, for it to resize it to the right size for the screen. I was expecting that when I configured sizes in the code I copied from Laura, that the image processing in hugo would actually take the original image file, and create smaller images, that could be delivered to the user when they view the page. Rather than shipping a big file over the wire, and then resizing it on the browser.
Is this a fundamental misunderstanding of what the image processing in Hugo can actually do? is this possible in anyway shape or form?
This sound like you tried to use html tags to resize the images, but that will download the huge image and resize in your html. So 5 times if you have five sizes to display.
The important chapter is under caption “Images” in her post.
I’ve read that page multiple times, and looked at the examples. And the one thing it entirely leaves out and I can’t make sense. Is where do I put that short code ?
Do I put it in every markdown page everytime I want to use an image? 46 lines of markdown. That’s a lot of typing every time.
The community is eager to help and assist with any technical problems
that all let me close with citation from requesting help:
The bottom line is, if you are unwilling to invest the time required to learn these things, then Hugo is not for you.
…
It is really a worthwhile investment to put the time in, to learn the basic building blocks well.
Hugo is not for the faint of heart, and I like they acknowledge that in requesting help write-up. I spent 80-100 hours setting up my first website, but the second took less than 24 hours. The learning curve is steep (and sometimes frustrating), but the rewards are sweet.