How to set upload size limit in pixels (4 posts)

  1. Manuel Schmalstieg
    Posted 5 years ago #

    You know the situation: you have set everything up for the client who wants to manage himself the content of his website. You teached him not to copy-paste directly from MS Word, and you told him to upload images at a reasonable size.

    Of course, WP has been configured to resize all images appropriately, so there is nothing to worry ...

    except that the customer will upload 10 MB images from his camera, at sizes of 5000 x 3000 px ... and WP won't produce any thumbnails for those, as the resizing exceeds the memory limit.

    Question: can we define a maximum pixel width (of, say 2000px in any direction) beyond which the user will simply get a warning message?

    Setting an upload limit in MB for any uploads would be no good though, since we should allow the upload of a 15 MB pdf, for instance.

  2. bjlong
    Posted 4 years ago #

    Have you found a solution to limiting the pixel dimensions of an image upload? I could be satisfied with a message to the user to resize the image and try again. And also delete the attempted upload.

    Any help would be appreciated.

  3. Manuel Schmalstieg
    Posted 4 years ago #

    No, unfortunately I didn't.

    I guess we should either post the question on the [wp-hackers] mailing-list, or open a feature request in trac.

  4. Manuel Schmalstieg
    Posted 4 years ago #

    Got some feedback from the list!

    For the time being, there is an advanced upload plugin that can help - it has client-side resizing capacity:

    According to @ottodestruct, Plupload will be integrated into WordPress 3.3. How cool is that? :)

Topic Closed

This topic has been closed to new replies.

About this Topic