Embed media issue

User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Edi wrote:Yes, the embedding does not work. This seems to be a problem with the decoding of the image:

Code: Select all

background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC)
This is not true, sorry. The encoded image is the instagram logo.

Anyway, the problem is the following snippet as Diego stated before:

Code: Select all

<script src="//platform.instagram.com/en_US/embeds.js"></script>
Because the URI is converted to a relatrive path:

Code: Select all

<script src="/bl-content/uploads/platform.instagram.com/en_US/embeds.js"></script>
But it works when using the absolute path:

Code: Select all

<script src="https://platform.instagram.com/en_US/embeds.js"></script>
Last edited by Edi on Sat Jul 30, 2016 9:53 pm, edited 2 times in total.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
murko
Sr. Bludit
Posts: 40
Joined: Sat May 28, 2016 11:16 am

So in short (just to make sure it will work all the time) I need to edit Instagrams original code and add "https:" in front so that...

Code: Select all

<script src="//platform.instagram.com/en_US/embeds.js"></script>
becomes

Code: Select all

<script src="https://platform.instagram.com/en_US/embeds.js"></script>
I can do that :)
I do add instagram media to the site really seldom so this is now a non-issue for me if that'll do it.

Still curious though on the "why"!
Why I only sometimes experience problems with this. Yesterday and today the posts (without https:) works fine, but the day before that they were only shown on NB and not on Bludit
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

murko wrote:Still curious though on the "why"!
Perhaps because the script and/or the images are stored in the browser cache.

Good explanatiosn of pathes with and without http/https is given here:

http://stackoverflow.com/questions/5500 ... t-src-http
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
millahjovich
Jr. Bludit
Posts: 5
Joined: Mon Jul 04, 2016 9:42 am

what editor are you using ? because Nibbleblog has Tinymce as default and Bludit has SimpleMDE (you can change to the plugin Tinymce).
Post Reply