Permalink
Browse files

MINOR: Add a fallback thumbnail image for oEmbed inserts

  • Loading branch information...
1 parent 30ecb9f commit 15a5dab3951b42e02d373ef672516adb5f3e7db9 @simonwelsh simonwelsh committed May 24, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −0 README.md
  2. +1 −1 forms/HtmlEditorField.php
  3. BIN images/default_media.png
View
@@ -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/).
@@ -553,7 +553,7 @@ protected function getFieldsForOembed($url, $file) {
} elseif($file->Type == 'photo') {
$thumbnailURL = $file->Oembed->url;
} else {
- $thumbnailURL = $url;
+ $thumbnailURL = FRAMEWORK_DIR . '/images/default_media.png';
}
$previewField = new LiteralField("ImageFull",
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 15a5dab

Please sign in to comment.