Page MenuHomePhabricator

Show file sizes for images, vector graphics and videos
Closed, ResolvedPublic2 Estimated Story Points


When choosing a file type in the interface, we offer a drop down that lists size options. Currently, the size options are only shown for some image types. The file types where the size options should be shown are image, drawing, and video. They should be shown both for the general file types and specific file extensions (e.g. png and svg don't)

Event Timeline

We had discussed that excluding certain Image formats from showing the selectors should be avoided since it would require to hard-code that. @gabriel-wmde is that correct?
We're only talking about the image formats here, not the general file type.

Screenshot_20170925_144846.png (260×504 px, 10 KB)

Screenshot_20170925_144856.png (269×488 px, 8 KB)

The options at hand were:

  1. Make them appear for all image formats
  2. Make them appear for none of the image formats

Specifying a height/width for SVGs seems to work (at least in the sense as there are different results):

I've looked throuh the first 100 entries of SVGs and saw that they all have width/height.

If this is the case, and it doesn't break the search, then I am all for showing the selectors for all image formats, rather than for none.

I've read the description 3x and the comment 1x and still don't know what actually needs doing. From the description I understand that currently the options are only shown for some image formats. Then the description says they should be shown for specific formats (no idea how that is different from the current situation), while the comment says they either need to be shown for all or for none. So that all adds up to "something needs to happen related to showing the file size options"...

@JeroenDeDauw as far as I can see only Image and Video in the General file type section trigger the file size options while Image formats png and jpg don't trigger this. Since we can't just have some of the image formats trigger the sizing and others don't we decided to go forward with having all the image formats trigger it.

Does that help?

Change 382679 had a related patch set uploaded (by Gabriel Birke; owner: Gabriel Birke):
[mediawiki/extensions/AdvancedSearch@master] Support dimensions for images and videos

gabriel-wmde moved this task from Doing to Review on the WMDE-Fundraising-Sprint-12 board.

Change 382679 merged by jenkins-bot:
[mediawiki/extensions/AdvancedSearch@master] Support dimensions for images and videos

This is now deployed and can be tested

Hey, thanks for the ping!

Looks good to me :)

I have one question which is kinda related:

the tab created for a search like that has a path

Screenshot_20171101_170232.png (56×543 px, 4 KB)

would it be possible to remove that to just display filetype: png and if yes should that go into an extra ticket or is it like a two second fix?

Hi @Charlie_WMDE,
nice spot. What you see ("path") is the mime type the search is actually performed for - not the file extension we are used to from user interfaces (e.g. both ".jpg" and ".jpeg" are found for "image/jpeg").
But you are right, this is something we should probably change. I think it may have actually been introduced during T170402.
The component rendering the previews does have a rather convenient extension point for that.
/cc @Lea_WMDE

thanks @Lea_WMDE and @Pablo-WMDE

this ticket can probably be closed then, right?

Lea_WMDE claimed this task.