This works perfectly fine, but I want Hugo to get the {{.profile_photo_url}} and process this to produce 1 .png and 1 .webp image. The main reasons to do this are 2:
better performance
stop google from tracking users
Google load image from a CDN “https://lh3.googleusercontent.com/” where it track users and collect personal data such as ip and I dont know what else. how can I process this image in Hugo so the images are served directly from Hugo site instead of a 3rd party google cdn.
where I am struggling is with using resources.GetRemote and then have the {{.profile_photo_url}}
the issue is that I do not have the exact url of the image, I am getting the url from the api call which I am currently using like this <img src="{{.profile_photo_url}}" alt="{{ .author_name }}">
The .profile_photo_url is coming from the json response, if I try to use it similar to your example it doesn’t work.
{{ $url := ".profile_photo_url" }}
{{ with resources.GetRemote $url }}
I do not have a static url to use, so how can I get an image from json response and process that in Hugo?