aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-02-07 18:30:56 +0000
committerMatthew Somerville <matthew@mysociety.org>2013-02-07 18:30:56 +0000
commitea9ee790cbd04d4314a9d1c964150b49db08b564 (patch)
treea056bf5b85d9470f41929a77033ebe82201dd76d /perllib/FixMyStreet/App.pm
parent388f208e3f4a7d0475ead27788ee873bc988f187 (diff)
Don't fetch width/height for full size images.
Diffstat (limited to 'perllib/FixMyStreet/App.pm')
-rw-r--r--perllib/FixMyStreet/App.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index b57e78a9e..db92736cd 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -450,17 +450,19 @@ sub get_photo_params {
my $pre = "/photo$key/" . $self->id;
my $post = '.jpeg';
- my $str = \$self->photo;
my $photo = {};
if (length($self->photo) == 40) {
$post .= '?' . $self->photo;
$photo->{url_full} = "$pre.full$post";
- $str = FixMyStreet->config('UPLOAD_DIR') . $self->photo . '.jpeg';
+ # XXX Can't use size here because {url} (currently 250px height) may be
+ # being used, but at this point it doesn't yet exist to find the width
+ # $str = FixMyStreet->config('UPLOAD_DIR') . $self->photo . '.jpeg';
+ } else {
+ my $str = \$self->photo;
+ ( $photo->{width}, $photo->{height} ) = Image::Size::imgsize( $str );
}
- ( $photo->{width}, $photo->{height} ) = Image::Size::imgsize( $str );
-
$photo->{url} = "$pre$post";
$photo->{url_tn} = "$pre.tn$post";
$photo->{url_fp} = "$pre.fp$post";