Page MenuHomePhabricator

Semantic media roles
Open, LowPublic

Description

(This is an early draft for an RfC)

There are several interrelated problems with the current media inclusion syntax that have to do with poor separation of content and presentation:

  • presentation-related parameters (e.g. size) are too specific and prevent effective use of the image in different environments then what the editor inserting the parameters was testing with. This is a frequent problem even with different desktop sizes, but becomes much worse for mobile and print.
  • the ability to influence the placement and display of images is limited, so editors wrap images into templates which add the positioning (e.g. {{multiple image}}), making the problem worse
  • skins cannot interact with image code generation, which mostly happens in the parser
  • integration between the content and the layout is becoming the norm for high-quality websites (head images are a simple example of this; for more advanced ones, look at this or this or this), and MediaWiki completely lacks the tools for that

What we need is an ability of content editors to assign semantic roles to images, and a wide authority for the skin the decide the right presentation based on those roles. That includes generating the markup for the image, but ideally also extends to altering the placement of the image in the DOM (e.g. if an editor puts an image with the semantic role "main image" after the intro paragraph, the skin should be able to pull that up to the beginning and turn it into a head image).

A possible first step is T90914; that task also contains a discussion of some of the difficulties this presents for cache invalidation.

See also T103630 which is a similar proposal for templates.

Event Timeline

Tgr created this task.Jun 23 2015, 10:45 PM
Tgr raised the priority of this task from to Needs Triage.
Tgr updated the task description. (Show Details)
Tgr added a project: MediaWiki-File-management.
Tgr added subscribers: Tgr, Spage.
Restricted Application added a project: Multimedia. · View Herald TranscriptJun 23 2015, 10:45 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Tgr updated the task description. (Show Details)Jun 24 2015, 12:35 AM
Tgr set Security to None.
GWicke added a subscriber: cscott.
Restricted Application added a subscriber: Matanya. · View Herald TranscriptJul 30 2015, 4:18 AM
Jdforrester-WMF triaged this task as Low priority.Sep 4 2015, 6:55 PM
Restricted Application added a subscriber: Steinsplitter. · View Herald TranscriptSep 4 2015, 6:55 PM
Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 7:00 PM
Restricted Application added a project: Commons. · View Herald TranscriptNov 12 2015, 11:42 PM
zhuyifei1999 moved this task from Incoming to Backlog on the Commons board.Nov 13 2015, 10:13 AM

I've been using T90914 as the main task for this problem.

Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptJun 20 2020, 7:17 PM