Set default embedded media (video and image ) size

Add the ability to set the default dimension of a video and image - High and Width in the config.edn.

i.e
image_size {:height 444, :width 666}
video_size {:height 444, :width 666}

Just throwing my support behind this!

Should also probably be a default size for iFrame

Try to edit custom.css:

img {
    width: 666px;
    height: auto;
}

To set the default size of youtube videos, add this to custom.css:

iframe[id^=youtube-player] {
    aspect-ratio: 16/9;
    height: auto;
}
2 Likes

Also I’ve found useful this settings for videos:

div.ls-wide-mode iframe[id^='youtube-player'] {
  height: 500px !important;
  width: 100% !important;
}

iframe[id^='youtube-player'] {
  height: 200px !important;
  width: 100% !important;
}

This way I get small frame in normal mode and the large one in wide mode. So I can switch size with shortcut t w:

Thanks Gijigae for this idea on github.

2 Likes

Awesome, thanks for sharing!

I didn’t know about wide-mode

1 Like

Thank you, it works!
btw, if you want to embed youtube without ads, add -nocookie before .com
{{video https://www.youtube-nocookie.com/...}}

and in custom.css

iframe[src^="https://www.youtube"] {
    aspect-ratio: 16/9;
    height: auto;
}