VAST examples / Media files
A <MediaFile> missing width and height
VAST 2.02 errors1 warningVAST-2.0-mediafile-dimensions
The scenario
A video SSP was normalizing creatives from a long-tail demand partner before exposing them to publishers. Publishers' players pick the best rendition for the current player size and bandwidth, so every MediaFile needs accurate dimensions.
The broken tag
<VAST version="2.0">
<Ad id="1">
<InLine>
<AdSystem>Test</AdSystem>
<AdTitle>Test</AdTitle>
<Impression>https://t.example.com/imp</Impression>
<Creatives>
<Creative>
<Linear>
<Duration>00:00:30</Duration>
<MediaFiles>
<!-- missing width and height -->
<MediaFile delivery="progressive" type="video/mp4">
https://cdn.example.com/ad.mp4
</MediaFile>
</MediaFiles>
</Linear>
</Creative>
</Creatives>
</InLine>
</Ad>
</VAST>What the validator reports
Running this tag through vastlint produces the following. The primary failure for this example:
VAST-2.0-mediafile-dimensionsIAB VAST 2.0 §2.3.5.2line 13<MediaFile> is missing required width attribute
The same tag also surfaces these secondary findings — real tags rarely fail in isolation:
VAST-2.0-mediafile-dimensionsIAB VAST 2.0 §2.3.5.2line 13<MediaFile> is missing required height attribute
VAST-2.0-linear-tracking-quartilesIAB VAST 4.1 §3.14.2line 9<Linear> has no standard quartile tracking events (start/firstQuartile/midpoint/thirdQuartile/complete) — ad will serve but measurement system receives no signal
Why it breaks
The <MediaFile> declares a type and delivery but is missing both width and height. Those attributes are required because the player's adaptive selection logic ranks candidate renditions by resolution against the current slot and connection. With no dimensions, the file cannot be placed in the selection ladder, and the player either ignores that rendition or, if it is the only one, plays it blind with no resolution information.
What it costs
When dimensions are absent the player may pick a mismatched rendition — serving a 1080p file into a tiny mobile slot (wasting bandwidth and risking buffering) or a low-res file onto a big-screen CTV (visibly soft creative that hurts brand perception). On a buy sold partly on viewability and completion, the downstream quality penalty is real even when the ad technically plays.
The fix
Add accurate width and height (in pixels) to every <MediaFile>, and supply multiple renditions spanning the resolutions your inventory serves so the player can adapt cleanly.
<MediaFiles>
<MediaFile delivery="progressive" type="video/mp4" width="640" height="360">
<![CDATA[https://cdn.example.com/ad-360.mp4]]></MediaFile>
<MediaFile delivery="progressive" type="video/mp4" width="1280" height="720">
<![CDATA[https://cdn.example.com/ad-720.mp4]]></MediaFile>
</MediaFiles>VAST XML fragment only. This excerpt belongs inside a complete VAST document, so standalone validation will fail until it is wrapped in a full <VAST>response.
Check your own version of this tag
Paste the resolved XML to run the same spec check, test a live tag URL, or inspect the wrapper chain hop by hop.
Related examples
- A <MediaFile> with no type attribute — VAST-2.0-mediafile-type
- A VAST 4.1 <Mezzanine> missing its required attributes — VAST-4.1-mezzanine-delivery
- An InLine ad with no <Impression> element — VAST-2.0-inline-impression
- An InLine ad missing the <AdSystem> element — VAST-2.0-inline-adsystem