##// END OF EJS Templates
Fixed viewing an image without a preview
neko259 -
r1906:0e271eae default
parent child Browse files
Show More
@@ -182,7 +182,10 b' class ImageViewer(AbstractViewer):'
182 return super().get_format_view()
182 return super().get_format_view()
183
183
184 preview_path = self.file.path.replace('.', '.200x150.')
184 preview_path = self.file.path.replace('.', '.200x150.')
185 pre_width, pre_height = get_image_dimensions(preview_path)
185 try:
186 pre_width, pre_height = get_image_dimensions(preview_path)
187 except Exception:
188 return super().get_format_view()
186
189
187 split = self.file.url.rsplit('.', 1)
190 split = self.file.url.rsplit('.', 1)
188 w, h = 200, 150
191 w, h = 200, 150
General Comments 0
You need to be logged in to leave comments. Login now