aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2012-06-07 17:42:13 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2012-06-07 17:42:13 +0200
commit7cc8c369cb6a01cffb58215966844b53794f32f4 (patch)
tree758fc647c3e5d6dc36ec62e8e34c4471b388f97d /include/network.php
parent1d832618a4340526092fce9e49f4580f767e1526 (diff)
downloadvolse-hubzilla-7cc8c369cb6a01cffb58215966844b53794f32f4.tar.gz
volse-hubzilla-7cc8c369cb6a01cffb58215966844b53794f32f4.tar.bz2
volse-hubzilla-7cc8c369cb6a01cffb58215966844b53794f32f4.zip
Add support for PNG images with alpha
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();