Skip to content

Commit

Permalink
change ImageSpecFields for #192
Browse files Browse the repository at this point in the history
  • Loading branch information
tykling committed May 26, 2024
1 parent e45d4d5 commit 78cf2f8
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions src/pictures/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@ class Picture(BaseFile): # type: ignore[django-manager-missing]

small_thumbnail = ImageSpecField(
source="original",
processors=[ResizeToFit(100, 100)],
format="JPEG",
)

medium_thumbnail = ImageSpecField(
source="original",
processors=[ResizeToFit(200, 200)],
processors=[ResizeToFit(150, 150)],
format="JPEG",
)

Expand All @@ -37,25 +31,19 @@ class Picture(BaseFile): # type: ignore[django-manager-missing]

small = ImageSpecField(
source="original",
processors=[ResizeToFit(700, 700)],
processors=[ResizeToFit(600, 600)],
format="JPEG",
)

medium = ImageSpecField(
source="original",
processors=[ResizeToFit(1000, 1000)],
processors=[ResizeToFit(1200, 1200)],
format="JPEG",
)

large = ImageSpecField(
source="original",
processors=[ResizeToFit(1500, 1500)],
format="JPEG",
)

slideshow = ImageSpecField(
source="original",
processors=[ResizeToFit(2400, 1600)],
processors=[ResizeToFit(2400, 2400)],
format="JPEG",
)

Expand Down

0 comments on commit 78cf2f8

Please sign in to comment.