https://bugzilla.wikimedia.org/show_bug.cgi?id=41835
Web browser: ---
Bug #: 41835
Summary: Requesting a new hook to allow manipulation of image
data (e.g. src attribute) before the image is rendered
Product: MediaWiki
Version: 1.21-git
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: Unprioritized
Component: API
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Classification: Unclassified
Mobile Platform: ---
Created attachment 11318
--> https://bugzilla.wikimedia.org/attachment.cgi?id=11318
The patch to add a new hook, 'ThumbnailBeforeProduceHTML', to
ThumbnailImage::toHtml method, in order to permit the user to manipulate the
image attributes before the HTML is rendered
We ran into this when trying to ensure that the images get updated promptly
when the user uploads a new file. Browsers tend to overcache, and MediaWiki
seems to currently offer no facilities to address this, though there are come
future plans to add file versioning.
Our (Knowledge Management group at Vistaprint inc.) proposed solution is to add
a new hook, 'ThumbnailBeforeProduceHTML', to ThumbnailImage::toHtml method.
This would allow the user to edit the src attribute and append a timestamp
parameter to it when the file's mtime changes.
We have implemented and tested this solution internally, and it works as
intended. The patchfile is attached.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l