forked from mirrors/bookwyrm
Thanks, ./bw-dev black
This commit is contained in:
parent
ef4961e4e9
commit
8b4cb4aeed
1 changed files with 13 additions and 0 deletions
|
@ -1,66 +1,79 @@
|
|||
from imagekit import ImageSpec, register
|
||||
from imagekit.processors import ResizeToFit
|
||||
|
||||
|
||||
class BookXSmallWebp(ImageSpec):
|
||||
processors = [ResizeToFit(80, 80)]
|
||||
format = "WEBP"
|
||||
options = {"quality": 95}
|
||||
|
||||
|
||||
class BookXSmallJpg(ImageSpec):
|
||||
processors = [ResizeToFit(80, 80)]
|
||||
format = "JPEG"
|
||||
options = {"quality": 95}
|
||||
|
||||
|
||||
class BookSmallWebp(ImageSpec):
|
||||
processors = [ResizeToFit(100, 100)]
|
||||
format = "WEBP"
|
||||
options = {"quality": 95}
|
||||
|
||||
|
||||
class BookSmallJpg(ImageSpec):
|
||||
processors = [ResizeToFit(100, 100)]
|
||||
format = "JPEG"
|
||||
options = {"quality": 95}
|
||||
|
||||
|
||||
class BookMediumWebp(ImageSpec):
|
||||
processors = [ResizeToFit(150, 150)]
|
||||
format = "WEBP"
|
||||
options = {"quality": 95}
|
||||
|
||||
|
||||
class BookMediumJpg(ImageSpec):
|
||||
processors = [ResizeToFit(150, 150)]
|
||||
format = "JPEG"
|
||||
options = {"quality": 95}
|
||||
|
||||
|
||||
class BookLargeWebp(ImageSpec):
|
||||
processors = [ResizeToFit(200, 200)]
|
||||
format = "WEBP"
|
||||
options = {"quality": 95}
|
||||
|
||||
|
||||
class BookLargeJpg(ImageSpec):
|
||||
processors = [ResizeToFit(200, 200)]
|
||||
format = "JPEG"
|
||||
options = {"quality": 95}
|
||||
|
||||
|
||||
class BookXLargeWebp(ImageSpec):
|
||||
processors = [ResizeToFit(250, 250)]
|
||||
format = "WEBP"
|
||||
options = {"quality": 95}
|
||||
|
||||
|
||||
class BookXLargeJpg(ImageSpec):
|
||||
processors = [ResizeToFit(250, 250)]
|
||||
format = "JPEG"
|
||||
options = {"quality": 95}
|
||||
|
||||
|
||||
class BookXxLargeWebp(ImageSpec):
|
||||
processors = [ResizeToFit(500, 500)]
|
||||
format = "WEBP"
|
||||
options = {"quality": 95}
|
||||
|
||||
|
||||
class BookXxLargeJpg(ImageSpec):
|
||||
processors = [ResizeToFit(500, 500)]
|
||||
format = "JPEG"
|
||||
options = {"quality": 95}
|
||||
|
||||
|
||||
register.generator("bw:book:xsmall:webp", BookXSmallWebp)
|
||||
register.generator("bw:book:xsmall:jpg", BookXSmallJpg)
|
||||
register.generator("bw:book:small:webp", BookSmallWebp)
|
||||
|
|
Loading…
Reference in a new issue