# How can I add an image?

**URL:** <https://forums.swift.org/t/how-can-i-add-an-image/54577>\
**Category:** Using Swift\
**Tags:** off-topic, ubuntu\
**Created:** [January 12, 2022, 9:00am UTC](https://forums.swift.org/t/how-can-i-add-an-image/54577 "2022-01-12T09:00:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ddraig](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ddraig/32/21224_2.png) [@ddraig](https://forums.swift.org/u/ddraig)\
**Post date:** [January 12, 2022, 9:00am UTC](https://forums.swift.org/t/how-can-i-add-an-image/54577/1 "2022-01-12T09:00:48Z")

</div>

Hi!

Here is the piece of code where I would like to add an image:

```
            Image("fruit") 

```

But the image does not load...  
Could someone send me a link where I can read more about the Image stuff, please?  
(I am new to swift)

---

<div class="post-metadata">

**Author:** ![wowbagger](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/wowbagger/32/13847_2.png) [@wowbagger](https://forums.swift.org/u/wowbagger)\
**Post date:** [January 12, 2022, 11:06am UTC](https://forums.swift.org/t/how-can-i-add-an-image/54577/2 "2022-01-12T11:06:56Z")

</div>

I _guess_ you're trying to use [SwiftUI's Image](https://developer.apple.com/documentation/swiftui/image). If this is the case, you won't be able to use it on Ubuntu (which I assume is the system you're using, because this topic is tagged "ubuntu"), because SwiftUI is a proprietary framework from Apple and is only available on recent Darwin systems. It's not part of the Swift open-source project. If you need something similar, I suggest checking out [Tokamak](https://github.com/TokamakUI/Tokamak).

---

<div class="post-metadata">

**Author:** ![ddraig](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ddraig/32/21224_2.png) [@ddraig](https://forums.swift.org/u/ddraig)\
**Post date:** [January 13, 2022, 3:17am UTC](https://forums.swift.org/t/how-can-i-add-an-image/54577/3 "2022-01-13T03:17:33Z")

</div>

Hello wowbagger!

I've never heard about Tokamak, this is new to me. Thank you very much for telling me about that.  
But my question is related to webdesign, an not to an app for iphone or ipad.

I downloaded swift for Linux, and then I downloaded a command line program called "Publish". It generates a static website for you (this software is writen in swift).  
You can find Publish in this address:

[https://github.com/johnsundell/publish](https://github.com/johnsundell/publish)

The default theme that comes inside Publish is very simple... but sometimes I find a website with pictures on the header or in the footer (generated using Publish), like this one:

[https://chemy.app](https://chemy.app)

The themes for Publish are not build using HTML, it uses the Swift Language, and I am an absolute begginer in swift... I don't know how to add a picture to the website, and can't find a online resource to learn more about this...

---

<div class="post-metadata">

**Author:** ![ddraig](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ddraig/32/21224_2.png) [@ddraig](https://forums.swift.org/u/ddraig)\
**Post date:** [January 13, 2022, 4:06am UTC](https://forums.swift.org/t/how-can-i-add-an-image/54577/4 "2022-01-13T04:06:48Z")

</div>

Hi again, wowbagger!

I found out the solution to my question, and I wanna share it with you and the others.

This code worked to me:

Image(url: "[http://www.path-to-your-image.TopLevelDoamin/theimage.svg](http://www.path-to-your-image.TopLevelDoamin/theimage.svg)", description: "A description")

This is the source where I found the help I needed:

[https://github.com/JohnSundell/Plot](https://github.com/JohnSundell/Plot)

Thank you again!
