6 Replies Latest reply on Nov 7, 2008 3:13 AM by Newsgroup_User

    Most efficient way to use thumbnails of multiple sizes

    AngryCloud Level 1
      When a user submits an image on my website, the upload script currently creates thumbnails in three different sizes (120px, 90px, and 20px). Different thumbnail sizes are used in different areas of the site.

      Is there a more storage-efficient way to display high-quality thumbnails in different sizes, without requiring a separate thumbnail file for each size used?

      I cannot rely on browsers to resize images as the quality is often very undesirable.
        • 1. Re: Most efficient way to use thumbnails of multiple sizes
          Maneet Puri Level 2
          Hello,

          What you can do is create the thumbnails on the fly while displaying it and run a cron script which will delete all the temporary thumbnails from the disk. This is a storage affective way but the only problem is, if there are many thumbnails to be displayed on a page then the execution time of the script will get increased.

          Hope this makes sense.

          Cheers,

          ~Maneet
          LeXolution IT Services
          Web Design Services
          • 2. Re: Most efficient way to use thumbnails of multiple sizes
            AngryCloud Level 1
            About how low long should it take to convert 50 thumbnails no larger than 150x150 to each fit a 120x120 area?

            Also, isn't it possible to output the images directly and not have the script save a file each time? This way I would not have to run crons.
            • 3. Re: Most efficient way to use thumbnails of multiple sizes
              Level 7
              Downsizing images is not so bad as long as you maintain the aspect ratio.
              Try it.

              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              ==================


              "AngryCloud" <webforumsuser@macromedia.com> wrote in message
              news:gerpea$8cp$1@forums.macromedia.com...
              > When a user submits an image on my website, the upload script currently
              > creates
              > thumbnails in three different sizes (120px, 90px, and 20px). Different
              > thumbnail sizes are used in different areas of the site.
              >
              > Is there a more storage-efficient way to display high-quality thumbnails
              > in
              > different sizes, without requiring a separate thumbnail file for each size
              > used?
              >
              > I cannot rely on browsers to resize images as the quality is often very
              > undesirable.
              >

              • 4. Re: Most efficient way to use thumbnails of multiple sizes
                AngryCloud Level 1
                I got it working with the method that points the src of an img tag directly to the script that generates the thumbnails, using URL variables.

                The images load fast, but they should load instantly if the visitor has already recently loaded the same thumbnails. Is is possible to save the thumbnails to the visitor's temporary internet files using this method?
                • 5. Most efficient way to use thumbnails of multiple sizes
                  AngryCloud Level 1
                  I may not have been clear in my last post...

                  When an image is viewed normally on a page, it is saved to the client's computer so that it will load instantly the next time the image is called for.

                  Is it possible to save resampled images from a page onto the client's computer, so the visitor will not have to wait for images they have already seen to re-download and resample again?
                  • 6. Re: Most efficient way to use thumbnails of multiple   sizes
                    Level 7
                    AngryCloud wrote:
                    > I may not have been clear in my last post...
                    >
                    > When an image is viewed normally on a page, it is saved to the client's
                    > computer so that it will load instantly the next time the image is called for.
                    >
                    > I do not want visitors to have to wait for the same images they have already
                    > seen to re-download and resample. A file of each resampled image should be
                    > saved to the client's computer to avoid this.
                    >
                    > Is it possible to save resampled images on a page to the client's
                    > computer?


                    It sounds like your page needs to check whether the cached version
                    exists before creating the a new image, otherwise its always going to
                    create a new version of the image and send it to the browser... but I
                    don't know how this is possible.

                    Dooza

                    --
                    Posting Guidelines
                    http://www.adobe.com/support/forums/guidelines.html
                    How To Ask Smart Questions
                    http://www.catb.org/esr/faqs/smart-questions.html