Embedded images won't load unless from HTTPS?

So this is a bizarre one. I’m using a plugin that embeds images in FT, and it seems it just works for images starting with https.

I ran it through the inspector and manually play with the <img src="xxx"> tag and indeed, if the URL starts with https it works; otherwise I get a question mark instead as a placeholder.

Example image:

Works: https://i.imgur.com/8qcVRVO.png
Does not work: http://i.imgur.com/8qcVRVO.png

Has anyone has experienced this problem?

When previewing an .md file, for instance using Marked, both will work.

The bizarreness might come from that plugin you use, which sounds really nifty, by the way.
Would you mind sharing it ?

The plugin is rather simple and its implementation looks right:


Hi there! I’m the developer. I did this so long ago, I don’t know why I would have made that constraint. I will update that shortly. And I was actually just working on making it work with local files. But i’ll push a fix for the http/https bug today. Thanks for letting me know!

Hi Caroline,

The thing is that your code looks right… so I still think this is a FoldingText bug somehow.

Thanks for taking a look.

Ah, ok Ii took a look. This isn’t a FoldingText bug per se, it’s a feature. I believe it’s the default security setting for OS X apps to to prevent insecure connections. So, in this case, imgr provides both links and the https protocol will work, as you know. There is nothing appropriate I could implement to bypass this since it’s there for a reason. I would simply use the secure link!

I have updated the plugin to supported local files as well. Thanks :slight_smile:

Great plugin and lovely theme. Do you plan to share it? :wink:

I found it here https://github.com/carolineartz/Rendered-Images-for-FoldingText.