How to Embed Spotify Songs in Joomla

How to Embed Spotify Songs in Joomla

If you use Joomla, then you've had problems with embeds.

Before the launch of the OSEmbed extension, it was difficult to reliably embed any outside sources into your Joomla articles.

In this tutorial, I'm going to show you how to embed Spotify songs into Joomla.

Step #1. Install OSEmbed

  • You can download OSEmbed. Choose either the Free or Pro options.
  • Install OSEmbed into your site.
Download OSEmbed

Step #2. Get the Spotify song URL

  • Visit Spotify.com and find the song you want to embed.
  • Click on the menu for the song and click "Copy Spotify URL".
Get the Spotify song URL

When you copy a Spotify URL, they are going to look like this:

  • https://play.spotify.com/track/02QQXgeAghpU4smdM7l7We
  • https://play.spotify.com/track/0o6IWuQ9Uxt69jKdVZ1eg2
  • https://play.spotify.com/track/4npJaHkcdqXaPw2J2eSUya

In order to make the embed work, you need to change "play" to "open" in the URL. For example, change the URLs above to these:

  • https://open.spotify.com/track/02QQXgeAghpU4smdM7l7We
  • https://open.spotify.com/track/0o6IWuQ9Uxt69jKdVZ1eg2
  • https://open.spotify.com/track/4npJaHkcdqXaPw2J2eSUya

Why do we need to change the link? It's Spotify's fault. Until recently, all Spotify links used open.spotify.com. However they updated their URLs and didn't update some of their external integrations to reflect this change.

Step #3. Add the Spotify URL to a Joomla article

  • Go to your Joomla site and login.
  • Add the updated Spotify URL to a Joomla article:
Adding a Spotify song to Joomla

If you have the Pro version of OSEmbed, the URL will automatically be turned into a working Spotify embed! You'll see a preview inside the editor:

A Spotify song embedded in Joomla

That embed will work perfectly on the front of your site also:

A Spotify song embed showing in Joomla