diff --git a/core/model/modx/sources/modmediasource.class.php b/core/model/modx/sources/modmediasource.class.php index c347fbebe47..bc5b65ec967 100644 --- a/core/model/modx/sources/modmediasource.class.php +++ b/core/model/modx/sources/modmediasource.class.php @@ -1500,21 +1500,22 @@ public function setProperties($properties, $merge = false) */ public function prepareSrcForThumb($src) { - try { - if (!$this->filesystem->has($src)) { + if (substr($src, 0, 4) != 'http') { + try { + if (!$this->filesystem->has($src)) { + return ''; + } + } catch (Exception $e) { return ''; } - } catch (Exception $e) { - return ''; - } - $properties = $this->getPropertyList(); - if ($properties['url']) { - $src = $properties['url'] . DIRECTORY_SEPARATOR . ltrim($src, DIRECTORY_SEPARATOR); - } + $properties = $this->getPropertyList(); + if ($properties['url']) { + $src = $properties['url'] . DIRECTORY_SEPARATOR . ltrim($src, DIRECTORY_SEPARATOR); + } + + // don't strip stuff for absolute URLs - // don't strip stuff for absolute URLs - if (substr($src, 0, 4) != 'http') { if (strpos($src, DIRECTORY_SEPARATOR) !== 0) { $src = !empty($properties['basePath']) ? $properties['basePath'] . $src : $src; if (!empty($properties['basePathRelative'])) {