Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-49627

Update generate_image_thumbnail to not require writing temp files

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9
    • Fix Version/s: 2.9
    • Component/s: Files API, Repositories
    • Labels:
    • Testing Instructions:
      Hide
      1. navigate to a course and turn editing on
      2. Drag-and-drop upload a large image onto the course and have it "Add image to course page" (so it uses mod_label)
        • confirm that the image was displayed
      3. Navigate to your private files
      4. Upload an image
        • Confirm that a thumbnail of that image was displayed
      Show
      navigate to a course and turn editing on Drag-and-drop upload a large image onto the course and have it "Add image to course page" (so it uses mod_label) confirm that the image was displayed Navigate to your private files Upload an image Confirm that a thumbnail of that image was displayed
    • Affected Branches:
      MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Pull Master Branch:
      MDL-49627-master-2

      Description

      All places where we call generate_image_thumbnail in core first write a string to a temp file, then call generate_image_thumbnail for it, after which they throw the string away.

      Since PHP 5.4, we can now use most GD functions from the file content instead. Let's do that please!

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/May/15