Add-on Paid addon to rewrite attachment and thumbnail URLs to CDN

Amin Sabet

Well-known member
Currently if I have attachment viewing disabled for guests, then they see a thumbnail like this:

https://www.mu-43.com/data/attachments/126/126213-df8ab402dc65b791759f38fcb8fd735a.jpg

whereas members see the full attachment like this:

https://www.mu-43.com/attachments/30372689452_909eaf5039_h-jpg.146005/

I would like to have an addon that rewrites both of those URLs automatically to

https://cdn.mu-43.com/data/attachments/126/126213-df8ab402dc65b791759f38fcb8fd735a.jpg

and

https://cdn.mu-43.com/attachments/30372689452_909eaf5039_h-jpg.146005/

respectively, so I can use a CDN for both thumbnails and attachments.

I can use the Tinhte "Image Attachment Optimization & CDN Support" addon by @Dinh Thanh to rewrite attachment URLs to CDN, but it circumvents all attachment permissions, so guests don't get thumbnails even though their permissions are set that way.

If you can make this addon for me, please let me know your timeframe, asking price, and references.

Thanks,
Amin
 
By placing attachments in the data folder (or anywhere else other than the internal_data folder) you will lose all security for attachments. They will be accessible by everyone that knows where they are stored.

As it is now, they are stored as data files and must be processed back into their original form to be transmitted to a browser.
 
Last edited:
I just realized that rewriting attachments to CDN makes them not viewable at all even for members when guest permissions are disabled, so probably what I am trying to do isn't possible.
 
This is where a transparent type proxy like cloudflare can help.

But I appreciate it may not be possible for you to adopt it for various reasons.
 
Top Bottom