aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Photo.pm
diff options
context:
space:
mode:
authorGraeme Porteous <graeme@rgbp.co.uk>2019-12-18 16:16:54 +0000
committerDave Arter <davea@mysociety.org>2020-01-27 16:00:41 +0000
commit2d6af993630d9e43594975e093507ee62ed53b97 (patch)
tree514de24dd76344d88dcd5bf6494dbda519e90ebe /perllib/FixMyStreet/App/Controller/Photo.pm
parent856ae6bed192345249df8569518a4ecd074b3dc0 (diff)
Add per report OpenGraph images
Includes a bit of refactoring of PhotoSet::get_image_data to make it easier to call subsequent methods on the photo object. We then do this to get the width and height. Also adds width/height attributes to FixMyStreet::ImageMagick Attributes are updated every time the image is transformed and before the as_blob data, which also undefs the image, is returned so it always present for subsequent calls. Fixes #2394.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Photo.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Photo.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Photo.pm b/perllib/FixMyStreet/App/Controller/Photo.pm
index 5507e3a94..3408d5e35 100644
--- a/perllib/FixMyStreet/App/Controller/Photo.pm
+++ b/perllib/FixMyStreet/App/Controller/Photo.pm
@@ -43,7 +43,7 @@ sub during :LocalRegex('^(temp|fulltemp)\.([0-9a-f]{40}\.(?:jpeg|png|gif|tiff))$
$c->forward( 'output', [ $photo ] );
}
-sub index :LocalRegex('^(c/)?([1-9]\d*)(?:\.(\d+))?(?:\.(full|tn|fp))?\.(?:jpeg|png|gif|tiff)$') {
+sub index :LocalRegex('^(c/)?([1-9]\d*)(?:\.(\d+))?(?:\.(full|tn|fp|og))?\.(?:jpeg|png|gif|tiff)$') {
my ( $self, $c ) = @_;
my ( $is_update, $id, $photo_number, $size ) = @{ $c->req->captures };