#Hugo

Now You Can Have Shorter Image File Names with Hugo

by Radu

Until recently, when Hugo processed images, you would have ended up with huge file names, like this:

wp-duotone-svg_hud5f2a556e0d71fb18130247650145e11_38530_280x0_resize_q75_h2_box_2.webp

I always had to try to add image file names as short as possible, so I wouldn’t make that “snake” even bigger.

Good news, though! With the release of version 0.131.0, the images processed by Hugo will get shorter file names because now they use xxHash to create the image file hashes.

If you want to benefit from the new feature, you must upgrade to that version or up.

So, are the image file names short now? I wouldn’t say short, but definitely a lot shorter. Here’s an example of the new hash used:

word-wrap-notepad_hu16642772204372524769.webp

Compared to the one above, it’s pretty short.

That’s a Wrap

If some info is outdated or incorrect, or you have anything to add, say or ask, please contact me via Twitter or email.

Looking for a modern & optimized presentation website?

Hire me on Fiverr

About Radu

I've been working online, from home, for over 11 years, and I learned a lot of different things related to websites. My main expertise is WordPress, but for some time, I also started focusing on web development.