PDA

View Full Version : protocol-relative images


AndrewSimm
08-10-2014, 02:01 AM
I am going to be converting by site to HTTPS so I can use SPDY. I would like to use protocol-relative url's so I don't get mixed content warnings. Converting my local files and CDN files should be easy but I need protocol-relative urls for linked images.

Has anyone does this with vbulletin. Attachments is my issue I guess.

--------------- Added 1407646382 at 1407646382 ---------------

to be clear external images linked form another site is what a need protocol-relative urls.

fxdigi-cash
08-10-2014, 05:12 AM
if images on the same server, then you can modify the path with https:// instead.

if not the same server (external site from external server) then it is not possible...

AndrewSimm
08-10-2014, 06:38 AM
if images on the same server, then you can modify the path with https:// instead.

if not the same server (external site from external server) then it is not possible...

It is very much possible. For instance imgur has both http and https and if you have a link like
<img src="//i.imgur.com/nLJIIop.jpg" alt="" original-title="">

then it will load using whatever my page uses.

cellarius
08-10-2014, 06:20 PM
Of course it's possible - if vBulletin would offer an image proxy (like certain other forum software does).

Paul M
08-10-2014, 07:24 PM
Of course it's possible - if vBulletin would offer an image proxy (like certain other forum software does).
It doesnt, so other than a dig, the comment is rather pointless.

It is very much possible.
Thats fine if the remote site allows https, many do not.

AndrewSimm
08-11-2014, 11:02 PM
It doesnt, so other than a dig, the comment is rather pointless.


Thats fine if the remote site allows https, many do not.

Paul your right but most of the large ones do. I am simply inquiring about the option as I did not find a mod and wasn't sure if anyone else has tackled this. Thank you for answering my question though.

Zachery
08-11-2014, 11:06 PM
Ugly, but in theory you should be able to do a style replacement for http:// and change it to //

AndrewSimm
08-11-2014, 11:16 PM
Ugly, but in theory you should be able to do a style replacement for http:// and change it to //

My question is outside images that are posted. For instance if someone post an image from imgur http I would like it to just use //

Zachery
08-12-2014, 12:27 AM
Doing the style replacement will replace ALL urls from http:// to //

AndrewSimm
08-12-2014, 01:44 AM
Doing the style replacement will replace ALL urls from http:// to //

Zachery I am not looking to replace it in templates. I have already done this. If an user post a image from lets say imgur as an attachment via url I want to replace whatever they use (ex: http) with //.

Zachery
08-12-2014, 02:15 AM
I'm guessing you've never used the replacement var system. It replaces ALL of the template renderers output, COMPLETELY. Including anything in message data.

So, why not give my suggestion a try and see for yourself?