mirror of
https://github.com/typemill/typemill.git
synced 2025-08-06 22:26:32 +02:00
2.16.0 finish, fix media gd problem with docker
This commit is contained in:
2
cache/timer.yaml
vendored
2
cache/timer.yaml
vendored
@@ -1 +1 @@
|
||||
licenseupdate: 1744746578
|
||||
licenseupdate: 1744809148
|
||||
|
@@ -10,8 +10,5 @@ The content is organized in blocks, and you can move each content block up and d
|
||||
|
||||
You can add all kinds of content like tables, quotes, images, files, an automatic table of contents (TOC), or YouTube videos. There are also plugins to embed media from other platforms or to use selected HTML tags in content.
|
||||
|
||||
{.center loading="lazy" width="820" height="470"}
|
||||
*Just a dummy image*
|
||||
|
||||
If you are a developer, you can write plugins and integrate nearly everything into the editor with `{::]` shortcodes.
|
||||
|
||||
|
@@ -4,3 +4,6 @@ Typemill is a lightweight, flat-file CMS designed for simple, fast, and flexible
|
||||
|
||||
Stay in the loop and subscribe to the [Typemill newsletter](https://typemill.net/news)!
|
||||
|
||||
{.center loading="lazy" width="820" height="470"}
|
||||
*Just a dummy image*
|
||||
|
||||
|
0
media/custom/.gitkeep
Normal file
0
media/custom/.gitkeep
Normal file
@@ -288,6 +288,11 @@ class Media
|
||||
{
|
||||
# transform image-stream into image
|
||||
$image = $this->createImage();
|
||||
|
||||
if(!empty($this->errors))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$originalsize = $this->getImageSize($image);
|
||||
|
||||
@@ -418,7 +423,14 @@ class Media
|
||||
|
||||
public function createImage()
|
||||
{
|
||||
return imagecreatefromstring($this->filedata);
|
||||
$image = imagecreatefromstring($this->filedata);
|
||||
if(!$image)
|
||||
{
|
||||
$this->errors[] = Translations::translate('Could not create image from string. File corrupted, unsupported extension or gd-library not configured for extension.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return $image;
|
||||
}
|
||||
|
||||
public function getImageSize($image)
|
||||
@@ -643,8 +655,14 @@ class Media
|
||||
case 'webp': $image = imagecreatefromwebp($imagePath); break;
|
||||
default: return 'image type not supported';
|
||||
}
|
||||
|
||||
if(!$image)
|
||||
{
|
||||
$this->errors[] = Translations::translate('Could not create image from string. File corrupted, unsupported extension or gd-library not configured for extension.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return $image;
|
||||
return $image;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
version: '2.15.0'
|
||||
version: '2.16.0'
|
||||
title: 'Typemill'
|
||||
author: 'Unknown'
|
||||
copyright: false
|
||||
|
Reference in New Issue
Block a user