Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Does payload have the functionality to limit an image size within the upload field?

default discord avatar
mrl72 years ago
2

I'm trying to force a user to upload an image size of only 100x100px. Can we set that in the upload itself so if they don't upload that size, it shows them an error?

  • default discord avatar
    hades2000822 years ago

    I think you can only do this on the media collection itself, not at the field level that I've found.



    Could be worth a suggestion on GitHub though as I think it would be generally very useful to be able to restrict uploads at the field level, both for image dimensions, file sizes and also mime-types.

  • default discord avatar
    mrl72 years ago

    Thanks

    @365498720726286349

    , I added a feature request here:

    https://github.com/payloadcms/payload/discussions/2083

    Feel free to upvote.

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.