Flask_Images-不显示图像

时间:2018-08-01 23:29:12

标签: flask

我正在使用Flask_Images在应用程序主页中裁剪图像,这是我的代码段:

# Images caching
IMAGES_CACHE = '/tmp/myapp.images'
IMAGES_MAX_AGE = 10
IMAGES_PATH = ['static/imgs/products']

images = Images()
from flask_images import Images
images.init_app(app)

<img src="{{resized_img_src(product.image, width=184, height=300, mode='crop', quality=95)}}" />

product_image 路径为 / static / imgs / products

模板内部的路径如下所示:

/imgsizer/static/imgs/products/1-650x350.jpg?h=300&m=crop&q=95&w=400&s=PDe9H78j-PFgpDgKyeFjEPfqr2w

0 个答案:

没有答案