diff --git a/README.md b/README.md index 828b5de65..3f1d35738 100644 --- a/README.md +++ b/README.md @@ -39,3 +39,4 @@ and [installation from source](http://doc.silverstripe.org/framework/en/installa ## Attribution ## * Some icons by [Yusuke Kamiyamane](http://p.yusukekamiyamane.com/). All rights reserved. Licensed under a [Creative Commons Attribution 3.0 License](http://creativecommons.org/licenses/by/3.0/). + * default_media.png by Thibault Geffroy from [The Noun Project](http://thenounproject.com/). All rights reserved. Licensed under a [Creative Commons Attribution 3.0 License](http://creativecommons.org/licenses/by/3.0/). diff --git a/forms/HtmlEditorField.php b/forms/HtmlEditorField.php index ef59d03fb..e88f4991c 100644 --- a/forms/HtmlEditorField.php +++ b/forms/HtmlEditorField.php @@ -553,7 +553,7 @@ class HtmlEditorField_Toolbar extends RequestHandler { } elseif($file->Type == 'photo') { $thumbnailURL = $file->Oembed->url; } else { - $thumbnailURL = $url; + $thumbnailURL = FRAMEWORK_DIR . '/images/default_media.png'; } $previewField = new LiteralField("ImageFull", @@ -825,11 +825,11 @@ class HtmlEditorField_Embed extends HtmlEditorField_File { } public function getWidth() { - return $this->oembed->Width; + return $this->oembed->Width ?: 100; } public function getHeight() { - return $this->oembed->Height; + return $this->oembed->Height ?: 100; } public function getPreview() { diff --git a/images/default_media.png b/images/default_media.png new file mode 100644 index 000000000..c867d415e Binary files /dev/null and b/images/default_media.png differ