ElkArte Community

Extending Elk => Addons => Topic started by: badmonkey on July 20, 2018, 11:13:01 am

Title: Spuds image cache
Post by: badmonkey on July 20, 2018, 11:13:01 am
https://github.com/Spuds/Elk_Image_Cache_v10


This addon is wonderful!  Thanks for your work @Spuds‍ !


I do have a couple of questions.  One is it breaks photos from PB.  Apparently so does PB, so there's that.  Is here any way to fix that?  Second, it seems to hate animated gifs.  Same question applies.   ;D
Title: Re: Spuds image cache
Post by: tino on July 20, 2018, 04:23:43 pm
I think the gif issue is this line https://github.com/Spuds/Elk_Image_Cache_v10/blob/master/subs/ImageCache.class.php#L243

Code: [Select]
if( pathinfo($this->data, PATHINFO_EXTENSION) === 'gif' )
{
    $extension = 1;
}
elseif ( pathinfo($this->data, PATHINFO_EXTENSION) === 'png' ) {
    $extension = 3;
}
else {
    $extension = 2;
}

Will probably sort it, I think...
Title: Re: Spuds image cache
Post by: Spuds on July 20, 2018, 06:20:59 pm
I'd give that a try as well  :)