mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
Limit minimum original image size for thumbnails of external images
cf. xpressengine/xe-core a4a54f9 by @bnu Exclude external images less than 30% of the thumbnail size TODO: Make the limit configurable
This commit is contained in:
parent
f362d0e465
commit
78cbaea1a4
2 changed files with 8 additions and 0 deletions
|
|
@ -682,6 +682,10 @@ class commentItem extends Object
|
||||||
if($is_img = @getimagesize($tmp_file))
|
if($is_img = @getimagesize($tmp_file))
|
||||||
{
|
{
|
||||||
list($_w, $_h, $_t, $_a) = $is_img;
|
list($_w, $_h, $_t, $_a) = $is_img;
|
||||||
|
if($_w < ($width * 0.3) && $_h < ($height * 0.3))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -980,6 +980,10 @@ class documentItem extends Object
|
||||||
if($is_img = @getimagesize($tmp_file))
|
if($is_img = @getimagesize($tmp_file))
|
||||||
{
|
{
|
||||||
list($_w, $_h, $_t, $_a) = $is_img;
|
list($_w, $_h, $_t, $_a) = $is_img;
|
||||||
|
if($_w < ($width * 0.3) && $_h < ($height * 0.3))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue