Making WordPress.org

Opened 3 years ago

Closed 8 months ago

#5843 closed defect (bug) (fixed)

Maximum allowed file size

Reported by: kafleg's profile kafleg Owned by: dd32's profile dd32
Milestone: Priority: normal
Component: Theme Directory Keywords: needs-patch
Cc:

Description

There is information on the Themes upload page about the maximum upload file size is 10MB. But theme authors can submit themes with a size greater than 10 MB. Example ticket, https://themes.trac.wordpress.org/ticket/103339

Change History (7)

#1 @dd32
3 years ago

What's the ideal outcome here?

  1. Change the message to the proper upload limit?
  2. Limit uploads to 10M?

Currently the WordPress site accepts a maximum of 10MB uploads, but nginx/php accepts up to 50MB I think. Since this isn't being stored in the media library, the WP limit of 10MB isn't actually relevant to themes, and is why this is bypassed.

I'm tempted to suggest that maybe a combination should be used:

  • Add theme check warnings/limits on the maximum filesizes. Images shouldn't be larger than 1MB, screenshots not bigger than 500KB or something.
  • Have the limit enforced (Be it 10MB or other) on upload.

#2 follow-up: @kafleg
3 years ago

I think a theme check warning can give the solution for this case. But I don't think we can limit the image size to 1MB or screenshot to 500 KB or so. We can simply give the INFO in the theme check plugin to reduce the size below 10 MB.

Also, we can make the message to a proper upload limit.

For now, there is a message saying 10 MB upload limit but they can upload sizes bigger than that. It seems quite inlogical.

#3 in reply to: ↑ 2 @dd32
3 years ago

Replying to kafleg:

I think a theme check warning can give the solution for this case. But I don't think we can limit the image size to 1MB or screenshot to 500 KB or so. We can simply give the INFO in the theme check plugin to reduce the size below 10 MB.

For reference, for plugins the limits are set to: Screenshots: 10MB, Banners: 4MB, Icons: 1MB (These are twice what I personally considered reasonable, so it's just a sane maximum upper limit)

For now, there is a message saying 10 MB upload limit but they can upload sizes bigger than that. It seems quite inlogical.

Agreed, but there's a reason why I was asking which outcome you expected :) I'm okay with it saying 10MB and it allowing a larger upload, it's just acting as a suggestion in this case.. that most will either respect or ignore.

So the three outcome options are:

  1. Adjust to read 50MB
  2. Enforce a hard 10MB upload limit
  3. Leave it as-is (saying 10MB), allow uploading a 20MB file, and have Theme Check throw errors/warnings/notices about large file sizes, or enforcing the total size itself even - since uncompressed filesize might be more relevant than ZIP size.

My personal opinion is that we should just remove the limit text and implement some theme-check warnings, which would work better in a future where there's some other way than ZIP uploads for themes anyway

#4 @kafleg
3 years ago

I am fine with your opinion. Theme check WARNING/INFO will be a suitable option. We can give a clear message about the size there.

#5 @poena
3 years ago

I am fine with option 4, keep the bypass, remove the text, and help remind authors to reduce their file sizes using theme check.

#6 @Otto42
3 years ago

Removing the text is a bad solution. I would rather hard enforce the limit to 10 MB before doing that, and I will do that if necessary.

The limit was once a hard 10 MB. It was raised for other reasons, but I will definitely put it back down to a hard 10 MB before removing the text that tells you to keep it small.

Without some kind of checks, people will go nuts and upload stupidly large things. Not going to happen.

#7 @dd32
8 months ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 13101:

Theme Directory: Enforce the 10MB theme upload limit.

Fixes #5843.

Note: See TracTickets for help on using tickets.