File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -167,14 +167,17 @@ def images(id, face_index = nil)
167
167
url_prefix = Rails . configuration . x . printing_images . nrdb_classic_prefix
168
168
face_suffix = "-#{ face_index } " unless face_index . nil?
169
169
has_narrative_image = :narrative_text . presence && !face_index . nil?
170
+ image_sizes = {
171
+ 'tiny' => "#{ url_prefix } /tiny/#{ id } #{ face_suffix } .jpg" ,
172
+ 'small' => "#{ url_prefix } /small/#{ id } #{ face_suffix } .jpg" ,
173
+ 'medium' => "#{ url_prefix } /medium/#{ id } #{ face_suffix } .jpg" ,
174
+ 'large' => "#{ url_prefix } /large/#{ id } #{ face_suffix } .jpg"
175
+ }
176
+
177
+ image_sizes . narrative = "#{ url_prefix } /large/#{ id } #{ face_suffix } -narrative.jpg" if has_narrative_image
178
+
170
179
{
171
- 'nrdb_classic' => {
172
- 'tiny' => "#{ url_prefix } /tiny/#{ id } #{ face_suffix } .jpg" ,
173
- 'small' => "#{ url_prefix } /small/#{ id } #{ face_suffix } .jpg" ,
174
- 'medium' => "#{ url_prefix } /medium/#{ id } #{ face_suffix } .jpg" ,
175
- 'large' => "#{ url_prefix } /large/#{ id } #{ face_suffix } .jpg" ,
176
- 'narrative' => has_narrative_image ? "#{ url_prefix } /large/#{ id } #{ face_suffix } -narrative.jpg" : nil
177
- }
180
+ 'nrdb_classic' => image_sizes
178
181
}
179
182
end
180
183
end
You can’t perform that action at this time.
0 commit comments