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}
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;
}
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.
Awesome, thanks for sharing!
I didn’t know about wide-mode
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;
}
This code does not work after the last update. To fix it, replace div
with main
:
main.ls-wide-mode iframe[id^='youtube-player'] {
height: 500px !important;
width: 100% !important;
}
iframe[id^='youtube-player'] {
height: 200px !important;
width: 100% !important;
}
IMO this (16:9 ratio) should be the default setting for logseq
I wrote a post summarized from this post. It covers more scenarios like local videos and is written in a spoon-fed fashion: Default images and videos to a thumbnail size
With video embeds, is it possible to set the width on a per-video basis? For images there’s {:width 400}
. Is there something like {{video https://www.youtube.com/watch?v=xyz}}{:width 400}
?
For images, you can try the plugin “Image auto resizer”