From dd105e174e4f081eb3dea1931274308203742be0 Mon Sep 17 00:00:00 2001 From: Daku Date: Sat, 14 May 2016 22:56:08 +0100 Subject: [PATCH] images aren't always jpg, so don't force jpg all the handle_* exts use this as well, which can cause issues --- .htaccess | 13 +++++++++++-- core/imageboard.pack.php | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.htaccess b/.htaccess index fd951590..7fdf0a5a 100644 --- a/.htaccess +++ b/.htaccess @@ -31,8 +31,6 @@ php_flag magic_quotes_runtime 0 -DefaultType image/jpeg - ExpiresActive On @@ -49,3 +47,14 @@ DefaultType image/jpeg AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css AddOutputFilterByType DEFLATE application/x-javascript application/javascript + +DefaultType image/jpeg +AddType audio/mp4 f4a f4b m4a +AddType audio/ogg oga ogg opus +AddType image/bmp bmp +AddType image/svg+xml svg svgz +AddType image/webp webp +AddType video/mp4 f4v f4p m4v mp4 +AddType video/ogg ogv +AddType video/webm webm +AddType video/x-flv flv \ No newline at end of file diff --git a/core/imageboard.pack.php b/core/imageboard.pack.php index 9a426a03..71badf09 100644 --- a/core/imageboard.pack.php +++ b/core/imageboard.pack.php @@ -388,7 +388,7 @@ class Image { * @return string */ public function get_image_link() { - return $this->get_link('image_ilink', '_images/$hash/$id%20-%20$tags.$ext', 'image/$id.jpg'); + return $this->get_link('image_ilink', '_images/$hash/$id%20-%20$tags.$ext', 'image/$id.$ext'); } /**