6 Replies Latest reply on Oct 6, 2008 6:28 PM by David Wu

    upload and resize image dose not work very often

    David Wu
      I made the rule that fixed width with 330 px, and size 1500kb, but still have many pictures keep their origin size in the upload folder such as 2722x1814 or 2816x1880, then the server will show the error message fetal memory is not enough when I use "Show Thumbnail", what can I do?
        • 1. Re: upload and resize image dose not work very often
          Günter Schenk Level 4
          Hi,

          please try asking your host to increase the currently defined value of the php.ini setting "memory_limit" for your account to e.g. 16 or 32 MB -- many hosts will set it to 8 MB, what´s not enough for resizing extremely large images respectively generating thumbnails from them.

          Cheers,
          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: upload and resize image dose not work very often
            David Wu Level 1
            but the truly issue is the resize function doesn't work when upload, every file's width should be 330 pixel or less than that in the upload folder, but it's not.
            • 3. Re: upload and resize image dose not work very often
              Günter Schenk Level 4
              it´s most probably the smaller images which do get resized, but some bigger ones not, right ?

              Cheers,
              Günter Schenk
              Adobe Community Expert, Dreamweaver
              • 4. Re: upload and resize image dose not work very often
                David Wu Level 1
                I am not sure, because I asked my client to send the picture which not get resized to me, I upload it by myself, and it get resized, so I think it happened at random.
                • 5. Re: upload and resize image dose not work very often
                  Günter Schenk Level 4
                  --------
                  I upload it by myself, and it get resized, so I think it happened at random.
                  --------

                  I don´t think so, and an error message telling you something about "memory" issues is usually a quite reliable indication that the php.ini "memory_limit" setting needs to be increased.

                  Images such as 2722x1814 or 2816x1880 are indeed pretty large, and having PHP resize such an image to just 330 px width is a process which uses up quite some memory on the server, as the resize factor is significant -- the higher the resize factor, the more memory gets used up.

                  Cheers,
                  Günter Schenk
                  Adobe Community Expert, Dreamweaver
                  • 6. Re: upload and resize image dose not work very often
                    David Wu Level 1
                    If the reason is about memory, warning message should be happened when upload the image, because "show thumbnail" means resize at second time, how come you failed to resize the picture that system let it upload succeed at the first time by the same resize process?

                    upload procedure

                    a.jpg: 2722x1814, 1.2mb

                    upload condition: fixed width 330px, 1.5mb

                    "upload and resize" a.jpg -> file upload -> "resize engine" -> passed (but not work and no warning message)
                    "show thumbnail" a.jpg -> "resize engine" -> failed (not enough memory)

                    it doesn't make sense.

                    and you miss an important key point, I upload the same picture myself, and resize work, so I said it happened at random, and that's why I am so worried.