aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/network.php b/include/network.php
index eeb2460d1..446413cd8 100644
--- a/include/network.php
+++ b/include/network.php
@@ -807,8 +807,11 @@ function scale_external_images($s,$include_link = true) {
if(stristr($mtch[1],$hostname))
continue;
$i = fetch_url($mtch[1]);
+ // guess mimetype from headers or filename
+ $type = guess_image_type($mtch[1],true);
+
if($i) {
- $ph = new Photo($i);
+ $ph = new Photo($i, $type);
if($ph->is_valid()) {
$orig_width = $ph->getWidth();
$orig_height = $ph->getHeight();