diff --git a/core/imageboard/misc.php b/core/imageboard/misc.php
index cec051d1..c82d9f98 100644
--- a/core/imageboard/misc.php
+++ b/core/imageboard/misc.php
@@ -178,6 +178,11 @@ function create_image_thumb(string $hash, string $type, string $engine = null) {
$engine = $config->get_string(ImageConfig::THUMB_ENGINE);
}
+ $output_format = $config->get_string(ImageConfig::THUMB_TYPE);
+ if($output_format=="webp") {
+ $output_format = Media::WEBP_LOSSY;
+ }
+
send_event(new MediaResizeEvent(
$engine,
$inname,
@@ -186,7 +191,7 @@ function create_image_thumb(string $hash, string $type, string $engine = null) {
$tsize[0],
$tsize[1],
false,
- $config->get_string(ImageConfig::THUMB_TYPE),
+ $output_format,
$config->get_int(ImageConfig::THUMB_QUALITY),
true,
$config->get_bool('thumb_upscale', false)
diff --git a/ext/handle_video/theme.php b/ext/handle_video/theme.php
index 64251769..c304eff7 100644
--- a/ext/handle_video/theme.php
+++ b/ext/handle_video/theme.php
@@ -13,6 +13,15 @@ class VideoFileHandlerTheme extends Themelet
$loop = $config->get_bool("video_playback_loop");
$player = make_link('vendor/bower-asset/mediaelement/build/flashmediaelement.swf');
+ $width="auto";
+ if($image->width>1) {
+ $width = $image->width."px";
+ }
+ $height="auto";
+ if($image->height>1) {
+ $height = $image->height."px";
+ }
+
$html = "Video not playing? Click here to download the file.
";
//Browser media format support: https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats
@@ -48,7 +57,8 @@ class VideoFileHandlerTheme extends Themelet
$loop = ($loop ? ' loop' : '');
$html .= "
-