aboutsummaryrefslogtreecommitdiffstats
path: root/mod/parse_url.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/parse_url.php')
-rw-r--r--mod/parse_url.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/mod/parse_url.php b/mod/parse_url.php
index 27dac4d5d..cdf2223a8 100644
--- a/mod/parse_url.php
+++ b/mod/parse_url.php
@@ -215,8 +215,11 @@ function parse_url_content(&$a) {
$i = fetch_url($image);
if($i) {
+ // guess mimetype from headers or filename
+ $type = guess_image_type($image,true);
+
require_once('include/Photo.php');
- $ph = new Photo($i);
+ $ph = new Photo($i, $type);
if($ph->is_valid()) {
if($ph->getWidth() > 300 || $ph->getHeight() > 300) {
$ph->scaleImage(300);