aboutsummaryrefslogtreecommitdiffstats
path: root/include/feedutils.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-01-07 02:34:37 -0800
committerzotlabs <mike@macgirvin.com>2018-01-07 02:34:37 -0800
commit0d415fb3c9db41ee97b7ce933ebc84eab38a1fa4 (patch)
tree93b13551149b44d1b74fa4b4d8dc9d9fbb56b7bb /include/feedutils.php
parentada578e7e3fc86970be6d1f242f785dae14f5e30 (diff)
downloadvolse-hubzilla-0d415fb3c9db41ee97b7ce933ebc84eab38a1fa4.tar.gz
volse-hubzilla-0d415fb3c9db41ee97b7ce933ebc84eab38a1fa4.tar.bz2
volse-hubzilla-0d415fb3c9db41ee97b7ce933ebc84eab38a1fa4.zip
hubzilla issue #946
Diffstat (limited to 'include/feedutils.php')
-rw-r--r--include/feedutils.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/feedutils.php b/include/feedutils.php
index 4638ef66a..5e48cb1ee 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -1801,12 +1801,17 @@ function compat_photos_list($s) {
if($found) {
foreach($matches as $match) {
- $ret[] = [
+ $entry = [
'href' => $match[2],
- 'length' => 0,
'type' => guess_image_type($match[2])
];
+ $sizer = new \Zotlabs\Lib\Img_filesize($match[2]);
+ $size = $sizer->getSize();
+ if(intval($size)) {
+ $entry['length'] = intval($size);
+ }
+ $ret[] = $entry;
}
}