Remove Width and Height Attributes and make it responsive?
-
Your script set dimensions to div like
style="width: 1080px; height: 608px;"
.
That makes a really ugly black lines like we can see on youtube.
I would like to make my video responsive and style with something likewidth: 100%; height: auto;
?
How can I remove the insert action from adding these attributes?I tried to something like this, but it didn’t work:
`add_filter( 'vjs-poster', 'remove_width_attribute', 10 ); add_filter( 'image_send_to_editor', 'remove_width_attribute', 10 ); function remove_width_attribute( $html ) { $html = preg_replace( '/(width|height)="\d*"\s/', "", $html ); return $html; }`
https://www.ads-software.com/plugins/video-embed-thumbnail-generator/
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Remove Width and Height Attributes and make it responsive?’ is closed to new replies.