diff --git a/public_html/templates/help.tpl b/public_html/templates/help.tpl
index 9015c56e..e804e765 100644
--- a/public_html/templates/help.tpl
+++ b/public_html/templates/help.tpl
@@ -176,6 +176,9 @@
{search: 'order:edit_date', description: 'like creation_date
, only looks at last edit time'},
{search: 'order:score', description: 'highest scored'},
{search: 'order:file_size', description: 'largest files first'},
+ {search: 'order:image_width', description: 'widest images first'},
+ {search: 'order:image_height', description: 'tallest images first'},
+ {search: 'order:image_area', description: 'largest images first'},
{search: 'order:tag_count', description: 'with most tags'},
{search: 'order:fav_count', description: 'loved by most'},
{search: 'order:comment_count', description: 'most commented first'},
diff --git a/src/Search/Filters/PostFilter.php b/src/Search/Filters/PostFilter.php
index aa62def8..ade8fce8 100644
--- a/src/Search/Filters/PostFilter.php
+++ b/src/Search/Filters/PostFilter.php
@@ -16,6 +16,9 @@ class PostFilter extends BasicFilter implements IFilter
const ORDER_LAST_FAV_TIME = 'posts.lastFavTime';
const ORDER_LAST_FEATURE_TIME = 'posts.lastFeatureTime';
const ORDER_FEATURE_COUNT = 'posts.featureCount';
+ const ORDER_IMAGE_WIDTH = 'posts.imageWidth';
+ const ORDER_IMAGE_HEIGHT = 'posts.imageHeight';
+ const ORDER_IMAGE_AREA = 'posts.imageWidth*posts.imageHeight';
const REQUIREMENT_TAG = 'posts.tag';
const REQUIREMENT_ID = 'posts.id';
diff --git a/src/Search/ParserConfigs/PostSearchParserConfig.php b/src/Search/ParserConfigs/PostSearchParserConfig.php
index 82a6296d..f577cca1 100644
--- a/src/Search/ParserConfigs/PostSearchParserConfig.php
+++ b/src/Search/ParserConfigs/PostSearchParserConfig.php
@@ -39,6 +39,9 @@ class PostSearchParserConfig extends AbstractSearchParserConfig
$this->defineOrder(PostFilter::ORDER_LAST_COMMENT_TIME, ['comment_time', 'comment_date']);
$this->defineOrder(PostFilter::ORDER_LAST_FEATURE_TIME, ['feature_time', 'feature_date']);
$this->defineOrder(PostFilter::ORDER_FEATURE_COUNT, ['feature_count', 'features', 'featured']);
+ $this->defineOrder(PostFilter::ORDER_IMAGE_WIDTH, ['image_width', 'width']);
+ $this->defineOrder(PostFilter::ORDER_IMAGE_HEIGHT, ['image_height', 'height']);
+ $this->defineOrder(PostFilter::ORDER_IMAGE_AREA, ['image_area', 'area']);
$this->defineBasicTokenParser(
function(SearchToken $token)
@@ -178,17 +181,17 @@ class PostSearchParserConfig extends AbstractSearchParserConfig
$this->defineNamedTokenParser(
PostFilter::REQUIREMENT_IMAGE_WIDTH,
- ['image_width', 'posts'],
+ ['image_width', 'width'],
self::ALLOW_COMPOSITE | self::ALLOW_RANGE);
$this->defineNamedTokenParser(
PostFilter::REQUIREMENT_IMAGE_HEIGHT,
- ['image_height', 'posts'],
+ ['image_height', 'height'],
self::ALLOW_COMPOSITE | self::ALLOW_RANGE);
$this->defineNamedTokenParser(
PostFilter::REQUIREMENT_IMAGE_AREA,
- ['image_area', 'posts'],
+ ['image_area', 'area'],
self::ALLOW_COMPOSITE | self::ALLOW_RANGE);
}