thumbnail generator webp support
This commit is contained in:
parent
0acfee6187
commit
6db38c0813
1 changed files with 9 additions and 4 deletions
|
@ -4,7 +4,12 @@ import shutil
|
||||||
from lektor.build_programs import AttachmentBuildProgram, buildprogram
|
from lektor.build_programs import AttachmentBuildProgram, buildprogram
|
||||||
from lektor.context import get_ctx
|
from lektor.context import get_ctx
|
||||||
from lektor.db import Image
|
from lektor.db import Image
|
||||||
from lektor.imagetools import compute_dimensions, get_image_info, get_quality, find_imagemagick
|
from lektor.imagetools import (
|
||||||
|
compute_dimensions,
|
||||||
|
get_image_info,
|
||||||
|
get_quality,
|
||||||
|
find_imagemagick,
|
||||||
|
)
|
||||||
from lektor.pluginsystem import Plugin
|
from lektor.pluginsystem import Plugin
|
||||||
from lektor.reporter import reporter
|
from lektor.reporter import reporter
|
||||||
from lektor.utils import portable_popen
|
from lektor.utils import portable_popen
|
||||||
|
@ -109,9 +114,9 @@ class ResizedImageBuildProgram(AttachmentBuildProgram):
|
||||||
|
|
||||||
|
|
||||||
class ThumbnailGeneratorPlugin(Plugin):
|
class ThumbnailGeneratorPlugin(Plugin):
|
||||||
name = u"thumbnail-generator"
|
name = "thumbnail-generator"
|
||||||
description = u"A configurable way to generate thumbnails."
|
description = "A configurable way to generate thumbnails."
|
||||||
image_exts = ["png", "jpg", "jpeg", "gif"]
|
image_exts = ["png", "jpg", "jpeg", "gif", "webp"]
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def config(self):
|
def config(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue