Skip to main content
Topic: [ADDON] External Image Proxy for http images (Read 263 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[ADDON] External Image Proxy for http images

Hi All,

Similar to the image proxy enchancement by spuds, this uses an external image proxy service rather than your local server.

http://addons.elkarte.net/enhancement/ExtImageProxy.html

I've tested it under every condition I can think off. It doesn't work the same way as spuds image proxy addon as it parses the whole page and then adds the links rather than doing it as you import the data.

I've not noticed any issues with doing it this way, but please let me know if you do have issues.

Thanks

tino

Re: [ADDON] External Image Proxy for http images

Reply #1
Did you notice my post about the ImageProxy extension I wrote for FreshRSS by any chance? :)

https://github.com/FreshRSS/Extensions/blob/4a2c6387b9c9a447c44715f9a29d47b654c1abbe/xExtension-ImageProxy/extension.php

It's based on the same idea (and the same default proxy).

Feel free to copy parts from my README if you find them applicable: https://github.com/FreshRSS/Extensions/blob/4a2c6387b9c9a447c44715f9a29d47b654c1abbe/xExtension-ImageProxy/README.md

I'd also suggest adding an admin setting to change the proxy. ;)

Re: [ADDON] External Image Proxy for http images

Reply #2
I hadn't actually.  It came from this issue over at SMF. https://www.simplemachines.org/community/index.php?topic=559023.20

I had already written the parsing code for TinyPortal and the integration of the SMF image proxy, switching it to use an external image proxy was a easy next step.

I meant to add a README, haven't got round to it yet.

I was going to add the option to use camo or weserv. I don't know of any other external services other than aws or similar.

Any further development will really depend upon it's popularity. It suits the purpose I needed, and I thought I would share it to others. I do appreciate your feedback.


Re: [ADDON] External Image Proxy for http images

Reply #4
It was more that each one has it’s own way of passing the url to fetch.

The current one removes the http, camo likes the https and also adds the key/hash.

Adding any proxy would require some custom code to enable that and allow you to choose the configuration.

If someone requests the addition of another proxy variant then I’m more than happy to add it. I think that’s the best way to expand this modification if it’s required.

I’ve taken some bits of your README thanks.

Re: [ADDON] External Image Proxy for http images

Reply #5
Regardless of other methods that may or may not be compatible, my point here is that just like camo you can set up your own "weserv" proxy wherever you want in seconds: https://github.com/andrieslouw/imagesweserv/blob/3.x/DOCKER.md

(Not that altering the URL in the file itself is a big chore, but it's nice polish to have. ;))

Re: [ADDON] External Image Proxy for http images

Reply #6
Regardless of other methods that may or may not be compatible, my point here is that just like camo you can set up your own "weserv" proxy wherever you want in seconds: https://github.com/andrieslouw/imagesweserv/blob/3.x/DOCKER.md

(Not that altering the URL in the file itself is a big chore, but it's nice polish to have. ;))

I added the option to use camo, nginx or your own weserv proxy url.

Can download it here; https://github.com/tinoest/ElkExtImageProxy/archive/ElkExtImageProxy-V1.1.0.tar.gz

I think that covers most options?


 

Re: [ADDON] External Image Proxy for http images

Reply #8
I think removing the & before the variable will solve this issue.

Can you try this version? You have to enable it in the settings, and choose the proxy, leave the other two files blank if you want to use the same as the orginal mod.

https://github.com/tinoest/ElkExtImageProxy/archive/master.zip