Network Internet Images- Fyne GUI Golang tutorial 26

Want to fetch images from internet ? You can easily do it in Fyne.

This tutorial is focused on displaying assets from internet.

Just 2 lines of code to fetch image from internet or any network

//This line of code will load image/resource from internet
r, _ := fyne.LoadResourceFromURLString("")
// This line will show the image on canvas
img := canvas.NewImageFromResource(r)

You can use these 2 apis for free images

// CAT API Free --
// New Random image URL

package main

// import fyne
import (


func main() {
// New app
a := app.New()
// New Title and Window
w := a.NewWindow("Load images from internet")
// loading images/assets/icons from computer
//r, _ := plugin.LoadResourceFromPath("c:/assets/tree.jpg")

// Images/assets from internet
//r, _ := plugin.LoadResourceFromURLString("")
r, _ := fyne.LoadResourceFromURLString("")
// CAT API Free --
// New Random image URL
img := canvas.NewImageFromResource(r)
textx:= canvas.NewText("my text change font", color.Black)

// Resize
w.Resize(fyne.NewSize(400, 400))

// Show and Setup content


Fyne Golang GUI Course

Tony BB

TonyBB is a Coach , marketer, hypnotist and a founder of RSKVF Production who specializes in providing simple, affordable, and easy to use solutions for Life.

Click Here to Leave a Comment Below 0 comments

Leave a Reply: