Problem/Motivation
The Size summary string Size: %width x %height pixels does not take into account that width and height are optional values (change record). Existing configuration with NULL for either width or height will cause an Exception to be thrown on the Media manage display for instance causing the site to become unusable for administrative users.
The new summary item was added in #2954834: Add poster image to HTML5 media videos.
Additionally this summary item duplicates explicit width and height summary items that are added later and are not displayed when either of those properties are null.
This affects Drupal 11.4 or greater.
Steps to reproduce
For main branch (D12) from scratch:
- Install Drupal
- Visit Administration > Extend
- Enable media module
- Visit Administration > Structure > Media types > Edit video
- Follow Manage display link
- Configure the Video file field
- Empty either the width or height, confirm
- Save display
- WSOD
Existing sites with a (local) Video Media type with width or height set to null in configuration are affected.
UI with a patch without UX improvements applied:

Proposed resolution
A WSOD is not displayed to users who do not have a value for Width and/or Height in the File Video Formatter summary when viewing Manage Display by implementing the suggestions from the usability review.
- Ensure that width and height are always displayed in the summary and that the non-NULL fallback value of
unsetis displayed in the summary for empty values. - Remove the Size summary item as this is duplicated information.
- Add descriptions to both the Width and Height settings form fields to explain the empty behavior (Option B):
- Description of Width field:
If empty, then the width attribute for the <video> tag is unset. - Description of Height field:
If empty, then the height attribute for the <video> tag is unset.
- Description of Width field:
Remaining tasks
- Create a follow-up issue for the Remote video media type to fix the WSOD in the iframe in case the maximum width and/or height field are being cleared, plus adjusting the micro copy on the summary and the format settings to the pattern recommended for this issue.
Questions for Usability Review
- Is displaying Width and Height summaries separately as the user had entered them on the form easier to understand than combining them in the summary into one “Size: 640 x 480” line? — Answer: Yes
- What term most accurately describes an empty value in the summary? — Answer:
unset
User interface changes
The File Video Formatter settings form fields Width and Height have form descriptions to clarify the behavior of empty values.
The Size summary item added in #2954834: Add poster image to HTML5 media videos has been removed.
Introduced terminology
The term unset is introduced to the File Video Formatter summary for width and height to indicate empty values.
API changes
No
Data model changes
No
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | duplicated-info.png | 20.58 KB | jfauske |
| #10 | both-values-set.png | 16.03 KB | jfauske |
| #10 | width-auto.png | 13.74 KB | jfauske |
| #10 | height-auto.png | 14.78 KB | jfauske |
| #10 | no-values-set.png | 12.15 KB | jfauske |
Issue fork drupal-3621776
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mradcliffeI triaged this Major because it would affect existing administrative users who would not have developer experience to debug their site when it is broken:
Comment #3
mradcliffeConfirmed on main branch from install and updated steps to reproduce to be based on those instructions.
Although I think that a Kernel Test that uses a valid configuration without width and height set would allow for a faster test. Something like this:
Comment #5
mradcliffeI created a kernel test for FileVideoFormatter settingsSummary with 4 test cases. Since it is media type related I put it in the media module.
This should demonstrate the error with valid values for width and height:
Comment #7
brandonlira commentedAdded a small follow-up commit to MR!17046.
The MR already added coverage for the NULL width/height cases. I added the corresponding formatter change so the Size summary uses "auto" as the fallback when width or height is NULL, matching the expected test coverage and avoiding NULL translation placeholders.
Comment #8
mradcliffeThank you for moving the issue forward, @brandonlira.
The Drupal Contribution Mentoring team is triaging issues for DrupalCon Rotterdam 2026, and we are reserving this issue for Mentored Contribution during the event.
After 2026.10.01 + 1 DAY (UTC), this issue returns to being open to all. Thanks!
I am adding the Novice tag to this issue because I think this can be a good opportunity for a group of new contributors to talk about the user experience (UX) for this formatter summary and come up with a recommendation for reducing the duplicated summary information.
Once a consensus on UX is complete, please update the proposed resolution section of the issue summary summarizing, and then remove the Needs issue summary update tag and possibly add any additional tags such as Needs Usability Review if further discussion is needed by the UX team, which would also be an excellent opportunity for those interested in UX and Usability to join the #ux channel in Drupal Slack to participate in the next UX meeting.
Meanwhile the group can also split out tasks such as manual testing taking before/after screenshots and updating the PHPUnit test and fix with a new proposed resolution.
Comment #9
jfauske commentedI'm at Drupalcon Rotterdam 2026, today I will be working on this issue. My mentor is Youri van Koppen.
Comment #10
jfauske commentedComment #11
megachrizI have been mentoring @jfauske at DrupalCon Rotterdam.
Comment #12
mradcliffe@rkoller and I discussed this in Drupal Slack #ux channel. The next step would be to improve the issue summary a little bit for the Usability team to discuss based on the thread in #ux channel. I'll try to summarize that discussion:
@rkoller also found an accessibility issue with the current admin theme where
--admin-color-text-softproperty is defined with color#545560and that is set against a background of#2A2A2D, which is a color contrast of 1.94:1 :O. I think this should be a follow-up because that applies to admin theme, but not Claro theme, and this issue applies to Drupal 11 and 12.I think there is consensus to not display redundant information and to always display the summary even if Width or Height are empty.
I added those questions to the issue summary.
Comment #13
rkollerUsability review
We discussed this issue at #3625965: Drupal Usability Meeting 2026-10-02. The link to the recording: https://www.youtube.com/watch?v=3YHPgdA8q4c. The attendees at the usability meeting were @benjifisher, @rkoller, and @simohell.
At first a few details we've noticed during our exploration and discussion - some of those were already covered in the summary in #12 (thanks to @mradcliff!):
Sizeattribute. If the video file has a width of for example640pxand a height of420pxon the field formatter widget form and you clear the value from theheightnumber field and pressUpdate, theSizeattribute shows640 x pixelsin the summary. If you clear both number fields instead, theSizeattribute becomesx pixelsin the summary. After pressing theSavebutton on theManage displaypage theSizeattribute changes to640 x auto pixelsfor the first example andauto x auto pixelsfor the second example. And depending on which fields are set and cleared additional redundant attributes lines are being shown. Meaning, with both number fields cleared, you only have theSizeattribute shown. With theWidthorHeightset and the other field unset you get theSizeattribute and the attribute of the number field with the set value. With both number fields having a set value you end up with theSize,WidthandHeightattribute line being shown. That way there is always a potential differing number of attributes with a potential change in order, which increases the cognitive load to the user significantly. In the context of theSizeattribute there is also always the question what the first and what the second number stands for, meaning, does the first number stand for the width or the height - at the very least those given values make one think.autois rather generic and ambiguous, raising more questions than it answers. It is a term which is familiar to tech savvy folks in the context of CSS but it might not ring a bell for the broader majority of people and induce misleading assumptions. Plusautosuggests that an actual value is being used for one of the attributes but it looks like, when the width or height field are being cleared the corresponding attribute is actually being removed from the video element instead.Imagemedia type the image style attribute is being displayed on the summary containing the dimensions, and the format settings widget only contains a select field for selecting the aforementioned image style. While theRemove videomedia type displays the attribute for the maximum size displaying the dimensions for the remote video. So we've thought the summary scenario does not apply to any of the media types shipping with the standard profile. But while writing up the summary i've revisited theRemote videomedia type and it turned out it is possible to set as well as clear the value of themaximum widthand themaximum heightof the remote video. If one or both number fields are getting cleared it causes a WSOD inside the iframe. With for example the max width value being cleared you are getting the following error inside the iframe:Input value "max_width" cannot be converted to "int"..The group had a clear consensus on the following recommendations:
Sizeattribute in the summary anymore, instead only display theWidthandHeightattributes all the time.unsetin lowercase for the attribute(s) in question in the summary instead ofauto.Widthand/orHeightnumber field. The group came up with the following two options. We haven't had a strong opinion in either direction and leave it up to the people working on the MR which approach to prefer. But we've considered each of the two proposed options small and in scope for the current issue and thought there is no need for the overhead of creating a separate follow-up issue:Option A
Wrap the two
WidthandHeightnumber fields into a fieldset with the following title and description:title:
Attributes for the <video> tagdescription:
If either is empty, then that attribute is unset.Option B
Keep the field format settings form as is and simply add the following two descriptions:
Description for the
Widthfield:If empty, then the width attribute for the <video> tag is unset.Description for the
Heightfield:If empty, then the height attribute for the <video> tag is unset.Remote videomedia type to fix the WSOD in the iframe in case the maximum width and/or height field are being cleared, plus adjusting the micro copy on the summary and the format settings to the pattern recommended for this issue.If you want more feedback from the usability team, a good way to reach out is in the #ux channel in Slack.
Comment #14
rkolleroh and forgot to change the status to
Needs workComment #15
mradcliffeThank you, usability review team.
After I watched the meeting recording the other day, which was very helpful to have, I noticed that Option A would also need to include the poster field in the fieldset because that is a video tag attribute. The description would then need to be more specific to the width and height form fields.
However, I think that given that, we should go with Option B for a simpler change.
I updated the issue summary to contain the usability review, the new proposed resolution. I hid some of the images for now because these no longer apply with the new proposed resolution. Once the merge request is back to Needs review, then if you wanted to @jfauske, you could create new ones, or if you wanted to get started on updating the merge request, you can do that too.
I think now all parts of this issue are Novice so I am leaving the issue tag intact.
Edit: I am going to go ahead and update the test in the merge request since I have the time today.
Comment #16
mradcliffeOkay, the test in the merge request (MR) is updated with the proposed resolution to resolve the WSOD, and now the MR needs to have all the fixes implemented.