Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Embed code generated contains errors

Embed code generated contains errors

Creating an embedable iframe generates wrong code:

<iframe 
style="border-radius:12px" 
src="https://open.spotify.com/embed/playlist/37i9dQZF1DXcBWIGoYBM5M?utm_source=generator"
 width="100%" height="352" frameBorder="0" allowfullscreen="" 
allow="autoplay; clipboard-write; encrypted-media; fullscreen; 
picture-in-picture" loading="lazy"></iframe>

According to standards the width attribute is a unitless value in pixels. 100% is wrong. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#width

Reply
1 Reply

"you can provide height and width in % to iframe. Although there is a catch to it." - https://stackoverflow.com/a/24301807/7111585

XimzendSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Suggested posts