Last modified: 2014-10-27 22:00:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T66214, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 64214 - Use content hash based image / thumb URLs
Use content hash based image / thumb URLs
Status: NEW
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.24rc
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 17577
  Show dependency treegraph
 
Reported: 2014-04-22 00:24 UTC by Gabriel Wicke
Modified: 2014-10-27 22:00 UTC (History)
12 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Gabriel Wicke 2014-04-22 00:24:32 UTC
Content hash based URLs for media files and thumbnails have some advantages over the current pretty names:

* automatic cache busting
* consistency of HTML revisions and media referenced in it, in particular in old revisions (important for HTML storage and Parsoid)
* natural content-based deduplication
* content-based image blocking (bad image lists etc)
* media renames don't trigger HTML updates
* simplifies a potential migration of all media content to commons

There are also some disadvantages:

* need to use Content-disposition header to suggest pretty name for image saving
* need to think about quick image purging for copyvio cases, as cache busting is not enough there

The details of what we'd need to do for this should probably be fleshed out on-wiki. For now I'm dropping this note here as a reminder and short summary.
Comment 1 Tisza Gergő 2014-04-22 00:54:31 UTC
By content-based thumbnail URL do you mean the URL is based on the content of the thumbnail, or on the content of the original file? None of the advantages seem to apply to the former, it makes quick purging even harder, and makes it impossible to guess the URL needed for resizing the image (which can be used for some fairly significant speed improvements).
Comment 2 Bawolff (Brian Wolff) 2014-04-22 05:33:40 UTC
We already have support for content disposition headers on files (for swift backend anyways). I imagine we could still use htcp for quick purging.

There are very definite advantages here related to caching. Among other things, It would also let us set more aggresive cache headers for the client.

File moving would also become much "better".

I believe there is already a bug for this, but cant find it.
Comment 3 Andre Klapper 2014-04-22 06:57:03 UTC
(In reply to Bawolff (Brian Wolff) from comment #2)
> I believe there is already a bug for this, but cant find it.

Bug 44428 comment 0?
Comment 4 Gabriel Wicke 2014-04-22 15:43:17 UTC
(In reply to Tisza Gergő from comment #1)
> By content-based thumbnail URL do you mean the URL is based on the content
> of the thumbnail, or on the content of the original file? 

Definitely the latter. Example: <sha1 of orig>-300.jpg

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links