It is possible to know the full path of an image in resources?

Hi there!

Another question about resources.Get

I have several formats in my assets/img folder and I was wondering if there is a way of print the full path of each image, including its extension.

Let me explain: I use -size.type to refer my files, thus by that I can do:

beholder-xs.png << notice this one is png

My problem arises because I also have some files which need to be multilingual.


The multilingual part is what I can’t get around. I can do an IF statement for each file that is in png format, because these are just a few, but I’m curious if there’s an easier way to that.

(I need them to be png because of transparency.)

Is there a way to check if the file format is jpg and then go to png if its not for each file in resources?

I thought you were moving to wordpress :wink:

But what you want can be provided by a page resource property

1 Like

I still am, just want to publish the second issue of the magazine with Hugo because its already almost done with it, but I’m switching to wordpress for sure.

Solved it, again flucked through it. ;-D

Docs are really, really cool, but some of the sections of it (like the Page Resources, for instance) can be somewhat… obscure. People keep linking the docs though.

There’s so much customization that goes into making hugo accomplish anything that isn’t your basic “quick and dirty template” that I look at the next update and shiver.

I already see myself having to go back to fiddle with the code…

I might look into Jekyll though, but it is sad to admit that so far nothing beats wordpress when it comes to digital publishing.