# Problem with external url for images

**URL:** <https://discourse.gohugo.io/t/problem-with-external-url-for-images/30495>\
**Category:** Uncategorized\
**Created:** [January 8, 2021, 9:23am UTC](https://discourse.gohugo.io/t/problem-with-external-url-for-images/30495 "2021-01-08T09:23:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dezo](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@dezo](https://discourse.gohugo.io/u/dezo)\
**Post date:** [January 8, 2021, 9:23am UTC](https://discourse.gohugo.io/t/problem-with-external-url-for-images/30495/1 "2021-01-08T09:23:12Z")

</div>

Im not sure how to do it by easiest and correct way

my hugo theme dont work with featured images using external url from tumlr etc. But i correct it on the index template replacing 🙂

`{{ $bg := (absURL (printf "images/%s" $image)) }}`  
with:

`{{ $bg := (absURL (printf $image)) }}`

I managed to do it a little by _accident_

But pls help how to edit post template becouse my featured images cant work on posts

**this is my layouts/\_default/single.html**

```
{{ define "main" }}
  <div class = 'wrap mt post'>
<div>
  {{- $date := (dateFormat "02. January 2006" .Date) -}}
  <p class = 'post_date'>{{ $date }}</p>
  <h1 class = 'post_title'>{{ .Title }}</h1>
  <div class = 'post_body'>
    <div class = 'post_inner'>
    {{ with .Params.image }}
      <img src = '{{ absURL (printf $image) }}' alt = '{{ . }}' class = 'post_thumbnail'>
    {{ end }}
      {{ .Content }}
    </div>
    <div class ='post_extra mb-2'>
      {{ partial "share" . }}
    </div>
    <div>
    {{ template "_internal/disqus.html" . }}
    </div>
  </div>
</div>
<a href = '{{ $.Site.BaseURL }}' class = 'post_nav'><span class = 'post_next'>The Latest 
  <svg class="icon icon_scale">
    <use xlink:href="#double-arrow"></use>
  </svg>
</span></a>
  </div>
{{ end }}
```

---

<div class="post-metadata">

**Author:** ![davidsneighbour](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidsneighbour/32/24507_2.png) [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Post date:** [January 8, 2021, 9:37am UTC](https://discourse.gohugo.io/t/problem-with-external-url-for-images/30495/2 "2021-01-08T09:37:13Z")

</div>

> [@dezo](#):
>
> ```auto
> {{ with .Params.image }}
> <img src = '{{ absURL (printf $image) }}' alt = '{{ . }}' class = 'post_thumbnail'>
> {{ end }}
> 
> ```

inside the `with` the `.Params.image` is a dot.

```auto
{{ with .Params.image }}
      <img src = '{{ absURL (printf .) }}' alt = '{{ . }}' class = 'post_thumbnail'>
{{ end }}

```

The title of course is not right anymore. probably `.Title`, if there is no other loop around.
