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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user