Welcome Guest, Not a member yet? Register   Sign In
Best Practice for Images : Generating Thumbs or Resizing on the Fly
#2

[eluser]Jondolar[/eluser]
You need to change the html header if you want to output the image (after resizing, etc.) and make sure you only output the image data with no other data. You'll need to search for proper headers to use when outputting an image.

Also, regenerating/resizing an image on every page load is pretty intensive. You might want to cache the image. There are two basic ways to cache the image. 1. Standard cache where you generate the image on the fly only if a cached version doesn't already exist. 2. Create the medium sized image when the image is uploaded.

I recommend you create the medium and thumb images when the image is uploaded. Disk space is cheap, usually. Plus, if you look at the size of your medium and thumb (possibly created with a lower quality level), you might see that they only take up 10% to 20% more disk space than the original.

Good luck with your project.


Messages In This Thread
Best Practice for Images : Generating Thumbs or Resizing on the Fly - by El Forum - 04-29-2010, 05:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB