Data + Science


Tableau Solution – Embedding URL Images in Tableau Public

This post offers a solution for embedding URL images in Tableau Public. This past week’s Makeover Monday featured a data set of Artwork from the Tate Collection. A number of people in the Tableau community tried linking the images from a public website gallery to their Tableau Public visualization. These visualizations worked well in Tableau Desktop, but when published on Tableau Public they didn’t work correctly. When linking to a URL, Tableau Public requires the URL to be HTTPS, which wasn’t possible without downloading and hosting all of the images.

Here is the tweet that started it all.

So how can we solve this? I first tried a solution that I created for embedding maps in Tableau. This mapping solution involves embedding the map in an iframe by using a placeholder URL that is hosted on my website. Unfortunately, this solution won’t work for images. However, the solution for this is just as simple. It takes just two lines of JavaScript code.

The two lines of code if you want to host on your own webpage: