django - 在easy_thumbnail django中使用图片URL
问题描述
目前我在我的 django 模板中使用以下代码来显示图片并相应地裁剪:
<img src= "{% thumbnail obj.picture 375x550 box=obj.cropping crop detail %}" alt="">
相反,我想使用 obj.picture.url 而不是图片对象本身。无论如何使用django的easy_thumbnails来做到这一点。我不想使用其他方式,因为我已经在整个应用程序中使用了裁剪功能设置。
解决方案
推荐阅读
- python - 额外的 none 值从何而来?
- here-api - 如何在 HERE 生成的道路路线中包含火车部门?
- php - 适用于 PHP 的 Microsoft Graph SDK - 400 错误请求 - 尝试获取数据
- java - ARJUNA022006:ORB 尚未初始化
- javascript - Angular从另一个组件发送数据
- php - WordPress 中的动态 htaccess 重定向
- java - 自定义 VDM 对象上缺少 Getter 方法
- pyspark - Pyspark:保存 sql.dataframe 时出现内存错误
- mysql - MySQL + SSRS(SQL Server Report Builder)数据集/查询参数不起作用
- java - 数据绑定不适用于大写字母包名称