Skip to content

Commit 9952680

Browse files
committed
skip image processing when there's no width or height defined
1 parent 1eeebca commit 9952680

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

djangocms_frontend/contrib/image/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ def img_src(self):
120120
# in this case we want to return an empty string to avoid #69
121121
elif not self.picture:
122122
return ""
123+
# skip image processing when there's no width or height defined
124+
elif not self.width and not self.height:
125+
return self.rel_image.url if self.rel_image else ""
123126

124127
picture_options = self.get_size(
125128
width=self.width or 0,

0 commit comments

Comments
 (0)