diff options
author | Matthew Somerville <matthew@mysociety.org> | 2016-04-20 15:32:00 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2016-04-20 15:32:00 +0100 |
commit | 193697bde57ef2cfd0a46bb5a85fa98727378297 (patch) | |
tree | e8dd78b7202b78e3483ac65924e054a23127a594 /perllib/FixMyStreet/DB/Result/Problem.pm | |
parent | f35b7eba0db02d16fa0aad5a78ee479165217e20 (diff) | |
parent | b7099e8e513fe64ec183b1403515f46a7cc25f19 (diff) |
Merge remote-tracking branch 'origin/1302-support-pngs'
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index 780a30e69..764f381a2 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -875,12 +875,12 @@ sub photos { my $i = 0; my $id = $self->id; my @photos = map { - my $format = 'jpeg'; my $cachebust = substr($_, 0, 8); + my ($hash, $format) = split /\./, $_; { - id => $_, - url_temp => "/photo/$_.temp.$format", - url_temp_full => "/photo/$_.fulltemp.$format", + id => $hash, + url_temp => "/photo/temp.$hash.$format", + url_temp_full => "/photo/fulltemp.$hash.$format", url => "/photo/$id.$i.$format?$cachebust", url_full => "/photo/$id.$i.full.$format?$cachebust", url_tn => "/photo/$id.$i.tn.$format?$cachebust", |