Commit c030a268 authored by Dylan Griffith's avatar Dylan Griffith

Merge branch '321297-load-only-metadata-for-markdown-video-include' into 'master'

Resolve "Load only metadata for Markdown video include"

See merge request gitlab-org/gitlab!54350
parents d1c3f878 1f87c5d3
---
title: Add preload attribute to markdown videos
merge_request: 54350
author:
type: performance
...@@ -15,7 +15,7 @@ module Banzai ...@@ -15,7 +15,7 @@ module Banzai
end end
def extra_element_attrs def extra_element_attrs
{ width: "400" } { width: "400", preload: "metadata" }
end end
end end
end end
......
...@@ -33,6 +33,7 @@ RSpec.describe Banzai::Filter::VideoLinkFilter do ...@@ -33,6 +33,7 @@ RSpec.describe Banzai::Filter::VideoLinkFilter do
expect(video.name).to eq 'video' expect(video.name).to eq 'video'
expect(video['src']).to eq src expect(video['src']).to eq src
expect(video['width']).to eq "400" expect(video['width']).to eq "400"
expect(video['preload']).to eq 'metadata'
expect(paragraph.name).to eq 'p' 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