[Tinhte] Image Attachment Optimization & CDN Support

[Tinhte] Image Attachment Optimization 2.3.0 20170315

No permission to download
My fault. Images is attached in XenPorta Recent News block and that is a reason why guests can view full image.
 
Hi guys, after installing this addon it sure makes images load a lot faster :) only issue I have is when you add the images as attachment at the footer the post, when you click on one of the thumbnails then it does not allow you to move to the next image, you need to close the popup and then click on the next, however if you add the thumbnails to the post, it then works fine, any ideas? thanks
 
Hi guys, after installing this addon it sure makes images load a lot faster :) only issue I have is when you add the images as attachment at the footer the post, when you click on one of the thumbnails then it does not allow you to move to the next image, you need to close the popup and then click on the next, however if you add the thumbnails to the post, it then works fine, any ideas? thanks

I've experienced this as well
 
Thank you, awesome mod!

I'm expecting to see a massivc drop in my server bandwidth from this mod. Being able to offload the attachments to CDN is something i've wanted to do ever since we converted to Xenforo.
 
Hmmm .. is there a way to set cache-control max-age ?? It appears they are being set as max-age=0 so the images are not getting cached by the CDN. So every user that visits a page, the CDN is grabbing a copy of the file as the max-age is not allowing it to be cached by the CDN.
 
Hmmm .. is there a way to set cache-control max-age ?? It appears they are being set as max-age=0 so the images are not getting cached by the CDN, so every user that visits a page, the CDN is grabbing a copy of the file as the max-age is not allowing it to be cached by the CDN.

Good pickup. max-age is the preferred method over expires, even better to use both.

Add
PHP:
$this->_response->setHeader('Cache-Control', 'max-age=2592000', true);
to both
library/Tinhte/AttachImageOptimization/ViewPublic/Attachment/View.php
and
library/Tinhte/AttachImageOptimization/ViewPublic/Attachment/View304.php
 
Good pickup. max-age is the preferred method over expires, even better to use both.

Add
PHP:
$this->_response->setHeader('Cache-Control', 'max-age=2592000', true);
to both
library/Tinhte/AttachImageOptimization/ViewPublic/Attachment/View.php
and
library/Tinhte/AttachImageOptimization/ViewPublic/Attachment/View304.php

Cheers, will see how that goes.

Kind of defeats the purpose of using the CDN if its not actually caching anything.
 
Kind of defeats the purpose of using the CDN if its not actually caching anything.

As you'll see in the .php it was never sending a max-age, so I don;t know where you were getting a max-age=0 from? Perhaps a non-compliant proxy that was defaulting?
In any case, setting an actual max-age is preferable.
 
Yeah im not entirely sure. I first picked up on it when looking at the cache hits for the attachments and it was showing 100% not able to be cached. I'll look into it when I get some time.
 
Top Bottom