# Image kirby tag converts url

**URL:** <https://forum.getkirby.com/t/image-kirby-tag-converts-url/15327>\
**Category:** Questions\
**Tags:** v2\
**Created:** [August 20, 2019, 11:37am UTC](https://forum.getkirby.com/t/image-kirby-tag-converts-url/15327 "2019-08-20T11:37:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [August 20, 2019, 11:37am UTC](https://forum.getkirby.com/t/image-kirby-tag-converts-url/15327/1 "2019-08-20T11:37:49Z")

</div>

Im using the image kirby tag to link the image to an external page. The link i’m using is an affiliate link with unsafe characters. Kirby is converting these to safe characters on the fly. This is the right thing to do, however the affiliate is saying the link needs to be exactly as they supplied it, without being converted.

Can i stop it doing this?

---

<div class="post-metadata">

**Author:** ![pixelijn](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@pixelijn](https://forum.getkirby.com/u/pixelijn)\
**Post date:** [August 20, 2019, 12:31pm UTC](https://forum.getkirby.com/t/image-kirby-tag-converts-url/15327/2 "2019-08-20T12:31:22Z")

</div>

I guess you can, I don’t have time to look at the source code now, but if you don’t use the `Html::a` class to create the link, it should work.

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [August 20, 2019, 9:17pm UTC](https://forum.getkirby.com/t/image-kirby-tag-converts-url/15327/3 "2019-08-20T21:17:54Z")

</div>

Whats weird about his one is if you use the link option on the image tag, it cleans up the url and encodes unsafe characters.

If you add the same link using the link kirby tag, it does not clean up the unsafe characters by encoding them.

@texnixe Do you know whats going on here?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [August 20, 2019, 9:19pm UTC](https://forum.getkirby.com/t/image-kirby-tag-converts-url/15327/4 "2019-08-20T21:19:44Z")

</div>

No, I would have to study the source code first to see what’s going on, as my alter ego already wrote above.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [August 20, 2019, 9:24pm UTC](https://forum.getkirby.com/t/image-kirby-tag-converts-url/15327/5 "2019-08-20T21:24:06Z")

</div>

Ok, they both use the `Html::a()` method to create the link tag.

---

<div class="post-metadata">

**Author:** ![jimbobrjames](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jimbobrjames/32/5802_2.png) [@jimbobrjames](https://forum.getkirby.com/u/jimbobrjames)\
**Post date:** [August 21, 2019, 4:34pm UTC](https://forum.getkirby.com/t/image-kirby-tag-converts-url/15327/6 "2019-08-21T16:34:40Z")

</div>

This is no longer an issue (for me). I got the company that supplied the link to update their system so it didnt use unsafe charchters anymore.

However, the issue of one tag encoding and the other not still persists for me. I’ll see if i can get to the bottom of it when i get a minute incase it helps someone else out.

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:23pm UTC](https://forum.getkirby.com/t/image-kirby-tag-converts-url/15327/7 "2025-02-06T17:23:09Z")

</div>


