Create a cache dir in /img (off webroot) then create an ImgController
with a cache() function (or a diferently named controller/function and
set up a Route).

When a file is not found in /img/cache the ImgController->cache
function is called where you can create the image and place it in
your /img/cache directory. If successful, redirect back to the
original image or pipe the image straight back.

This works extremely well for me, so I hope the functionality doesn't
go away :)

HTH

~GreyCells

On Apr 5, 1:11 am, "rtconner" <[EMAIL PROTECTED]> wrote:
> It seems I'm going to have to work with a few dynamic images. I hate
> doing that, but it seems like it'll have to be done.
>
> >From searching, it seems there used to be a tutorial here:
>
> http://wiki.cakephp.org/tutorials:dynamic-image, which is no longer
> there. Can we recover this tutorial? I would like to look at it, even
> if it is old.
>
> Outside of that, I assume I'll have to do something along the lines of
> <img src="/myapp/image?img_id=23" /> and generate the image in the
> image controller. Anyone have any experience in this. Is there a
> better way to go. I'm certainly open to tips on best practices and
> all.
>
> Things I've figured out are to use the next to lines of code in my
> image controller to get rid of cake printing anything to the output.
>
> $this->autoRender = false;
> Configure::write('debug',0);


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to