1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-05 21:57:31 +02:00

Version 1.4.7: Option noresize for images

This commit is contained in:
trendschau
2021-07-20 22:45:27 +02:00
parent b3fab62cf4
commit 8d82be9400
7 changed files with 76 additions and 17 deletions

View File

@@ -161,7 +161,17 @@ class MediaApiController extends ContentController
return $response->withJson(['errors' => 'Please check if your media-folder exists and all folders inside are writable.'], 500);
}
if($imageProcessor->publishImage())
# check the resize modifier in the image markdown, set it to true and delete it from markdown
$noresize = false;
$markdown = isset($params['markdown']) ? $params['markdown'] : false;
if($markdown && (strlen($markdown) > 9) && (substr($markdown, -9) == '|noresize') )
{
$noresize = true;
$params['markdown'] = substr($markdown,0,-9);
}
if($imageProcessor->publishImage($noresize))
{
$request = $request->withParsedBody($params);