Commit 1f87c5d3 authored by ddavison's avatar ddavison

Add preload attribute to markdown videos

parent c13b2235
---
title: Add preload attribute to markdown videos
merge_request: 54350
author:
type: performance
......@@ -15,7 +15,7 @@ module Banzai
end
def extra_element_attrs
{ width: "400" }
{ width: "400", preload: "metadata" }
end
end
end
......
......@@ -33,6 +33,7 @@ RSpec.describe Banzai::Filter::VideoLinkFilter do
expect(video.name).to eq 'video'
expect(video['src']).to eq src
expect(video['width']).to eq "400"
expect(video['preload']).to eq 'metadata'
expect(paragraph.name).to eq 'p'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment