0

I want to cache the thumbs because the images I am resizing are around 1-3 MBs each and it takes forever to load a page of thumbnails so I want to cache the thumbnails. Is this possible or do I need to take a new approach? Thanks!

Below is my current code:

<cfimage action="read" source="#dir.DIRECTORY#\#dir.name#" name="ImageObject" />
<cfimage action="resize" source="#ImageObject#"	width="115" height="89" name="ImageObject" />
<cfimage action="writetobrowser" source="#ImageObject#" style="margin-right:4px;" />
2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by arrgh
0

CF9 has does have vfs. But image processing is time consuming. No avoiding it. It's usually better to just create thumbnails once and save them on disk. Resizing every time a user requests a page wastes a lot of resources.

0

CF9 has does have vfs. But image processing is time consuming. No avoiding it. It's usually better to just create thumbnails once and save them on disk. Resizing every time a user requests a page wastes a lot of resources.

VFS looks very nice, too bad I'm on CF8. Since everything is done on the fly, manually making thumbs isn't really an option. Might there be any scripts out there for generating thumbs? I keep coming up empty handed on google searches..

0

Well .. I don't mean literally by hand ;-) Just that you'd have 2 versions of the images: full sized and thumbnail.
You'd still use the same CF code. But you'd only do it once and save them. It can be a batch script that cfloops through all of your images. Or code triggered when some event occurs, like an image is uploaded.

It's just too process intensive to run a resize every time somebody requests or refreshes the page.

Edited by arrgh: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.