Jump to content

Image cache for non-hosted images?


chilihead

Recommended Posts

Posted

Is there a way to cache images posted using the img tags, so if they ever remove them from their host, they still show on the forum? Like google cache. Would be great. Thanks

  • 3 months later...
Posted

I'm in the process of adding imgur support for embedding photos. Such a local image cache would work great for me. I'm having to do this for imgur because it doesn't serve https so I am copying the imgur links locally and turning them into local https links for display.

The other advantage to having a local image cache is that I can check that the user has permission to view the post containing the cached link. Also, the cached file may be checked to make sure it really is a gif, jpeg, png, or other valid image format.

And, the image cache can be pushed to a CDN and you minimize chances of slow page loads because of external image loading. Of course, when an image link is processed and the file is not in the local cache, you have to copy it before serving it and the copy may fail. If the cache is large enough to hold all images, then you won't have the copy failed problem (simply leave the original link in place until or when you can do a successful copy into the cache or fail to accept the link when the post is created).

Posted
http://community.inv...from-image-tag/


The mod you're thinking of was made by Alex, who was a mod developer with his own site/staff at that point but then became a community developer here and is now an IPS employee.


http://community.inv...er/109309-alex/

It was called "[AH23|TASK] Download Remote Images" and you can download it here:


http://invisionmoddi...-remote-images/

Not that you'd have a need to, since it's for IP.Board v2.3.x and won't work with IP.Board 3.x. If you ask him, he might give permission for someone else to update it.


Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...