最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Force WordPress to always generate a thumbnail for original image

programmeradmin2浏览0评论

WordPress only generates thumbnails for sizes smaller than the original image. However sometimes the user will upload an uncompressed image with dimensions below the specified thumbnail size e.g. uploads an image smaller than the default 1024px "large" thumbnail size. When the theme displays the "large" image, it will display the original image instead of a generated thumbnail.

This is a problem because the original image has not benefited from jpg compression and results in huge image file size for site visitors.

Ideally I would like to keep the original image and have an "optimised" version that can be served to visitors when the original image dimensions are smaller than the requested thumbnail size.

I have searched for a solution but am not having any luck. Can anyone point me in the right direction?

发布评论

评论列表(0)

  1. 暂无评论