Ticket #8307: images.py.2.diff
File images.py.2.diff, 750 bytes (added by , 13 years ago) |
---|
-
core/files/images.py
21 21 22 22 def _get_image_dimensions(self): 23 23 if not hasattr(self, '_dimensions_cache'): 24 close = self.closed 25 self.open() 26 self._dimensions_cache = get_image_dimensions(self, close=close) 24 if getattr(self.storage, 'IGNORE_IMAGE_DIMENSIONS', False): 25 self._dimensions_cache = (0,0) # Too costly to hit the file? 26 else: 27 close = self.closed 28 self.open() 29 self._dimensions_cache = get_image_dimensions(self, close=close) 27 30 return self._dimensions_cache