I’m having a great time playing around with resources.GetRemote and working on integrating it with Directus CMS. However, I’m noticing a pattern that I’d like to ask about: when I fetch an image with resources.GetRemote, process that image with Hugo Pipes, and finally run hugo, the generated resource is placed in public/ instead of public/images.
Is there any way to make sure that remote images end up in public/images, like local images that are processed with Hugo Pipes? I’d like to keep the root cleaner, if possible.
You have some form of code that processes the image and in that code you call the image “image.jpg”. Call it “images/image.jpg” and your wish will be granted.
You could also just post a sample of your code and we’ll tell you where the magic happens. That’s easier.
@pamubay Thank you for that solution! It works just like I had hoped. I thought there might be something with resources.FromString, but I assumed that method would only accept strings.
@jmooring Thank you for linking to the Github issue, which I clearly missed while searching there. I must have assumed that the title of that issue didn’t relate to my question.
Yes! I’ve seen it and will remember to use that if the mentioned issue is not addressed before I need this! resource.FromString gets so much done these days!