mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 09:13:02 +02:00
Support webp format (#1785)
* consider webP as an input and output format, meaning a derivative from webp is still a webp
This commit is contained in:
@@ -221,6 +221,10 @@ SELECT
|
||||
{
|
||||
$file_path.= 'jpg';
|
||||
}
|
||||
elseif (IMAGETYPE_WEBP == $type)
|
||||
{
|
||||
$file_path.= 'webp';
|
||||
}
|
||||
elseif (isset($conf['upload_form_all_types']) and $conf['upload_form_all_types'])
|
||||
{
|
||||
$original_extension = strtolower(get_extension($original_filename));
|
||||
|
||||
@@ -47,6 +47,7 @@ class pwg_image
|
||||
|
||||
function __construct($source_filepath, $library=null)
|
||||
{
|
||||
global $conf;
|
||||
$this->source_filepath = $source_filepath;
|
||||
|
||||
trigger_notify('load_image_library', array(&$this) );
|
||||
@@ -58,7 +59,7 @@ class pwg_image
|
||||
|
||||
$extension = strtolower(get_extension($source_filepath));
|
||||
|
||||
if (!in_array($extension, array('jpg', 'jpeg', 'png', 'gif')))
|
||||
if (!in_array($extension, $conf['picture_ext']))
|
||||
{
|
||||
die('[Image] unsupported file extension');
|
||||
}
|
||||
@@ -810,4 +811,4 @@ class image_gd implements imageInterface
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user