WordPress.org

Making WordPress.org

Opened 6 weeks ago

Last modified 5 weeks ago

#5171 new defect

Plugin Directory: Limit file size for 'asset' images

Reported by: Ipstenu Owned by:
Milestone: Priority: normal
Component: Plugin Directory Keywords:
Cc:

Description

This may be tricky, but we should limit the size of files for screenshots, banners, and icons.

Most people (properly) put them in the /assets/ folder, but there's a holdover from 'the old way' where it worked in the main plugin folder, which means we'll have to check multiple places, and by file size.

This will prevent the WP dashboard (and the website) from being slower than they need to be.

Change History (3)

#1 follow-up: @Otto42
6 weeks ago

We should probably stop supporting screenshots outside of assets in a going-forward manner. But that's another topic.

What would be appropriate size limits for these? Banners, icons, screenshots. All should have different limits.

#2 in reply to: ↑ 1 @Ipstenu
5 weeks ago

Replying to Otto42:

We should probably stop supporting screenshots outside of assets in a going-forward manner. But that's another topic.

Noted.

What would be appropriate size limits for these? Banners, icons, screenshots. All should have different limits.

I don't know. Can we grep them right now for an average filesize?

#3 @dd32
5 weeks ago

I don't know. Can we grep them right now for an average filesize?

Could probably look at the last 5,000 plugins with assets and see what they have.. It's not as easy as a grep but it's doable.

I'm not really sure if it's worthwhile setting "sane" limits here, or if we're not just better off by putting an 'absurd' high limit (say 2MB?) on to block any stupid-sized images.

$ svn ls -v https://plugins.svn.wordpress.org/hello-dolly/assets/ | grep -v '/$' | awk '{ byte = $3/1024; print byte " KB " $7 }'
175.067 KB banner-1344x500.jpg
75.3008 KB banner-772x250.jpg
46.5469 KB icon-128x128.jpg
55.04 KB icon-256x256.jpg

$ svn ls -v https://plugins.svn.wordpress.org/jetpack/assets/ | grep -v '/$' | awk '{ byte = $3/1024; print byte " KB " $7 }'
38.71 KB banner-1544x500.png
17.8594 KB banner-772x250.png
0.50293 KB icon-128x128.png
1.08789 KB icon-256x256.png
1.02246 KB icon.svg
266.567 KB screenshot-1.png
1140.15 KB screenshot-2.png
1479.11 KB screenshot-3.png
304.58 KB screenshot-4.png
Note: See TracTickets for help on using tickets.