wordpress后缩略图裁剪问题。这可能吗?
当我在 wp3 中使用后缩略图功能并将缩略图大小设置为例如 230x160 wp 时,会将图像从左上角裁剪为设置的大小。
遗憾的是,有时这只是图像中错误的部分。
有没有办法让后端用户有机会选择原始图像中应该作为缩略图的部分?比如 jQuery 脚本之类的?
现在我正在使用自定义字段解决方法来上传具有精确尺寸的第二张图像...
对此有什么想法吗?
//编辑
我刚刚发现我错了。裁剪函数通常采用图像的中间部分(如您在 wp-includes/media.php 文件第 336 行左右所见)。就我而言,图像甚至没有被裁剪,因为(我仍然需要验证)我的服务器没有安装 GD 库。
When I'm using the post thumbnail feature in wp3 and set the thumbnail size to e.g. 230x160 wp crops the image from the top left corner to the set size.
Sometimes this is sadly just the wrong part of the image.
Is there any way to give the backend user the chance to choose the part of the original image which should be the thumbnail? Like a jQuery script or something?
Right now I'm using a custom field workaround to upload a second image with the excact dimensions...
Any ideas on this?
//EDIT
i just figured out that i was wrong here. the crop function usually takes the middle part of the image (as you can see in the wp-includes/media.php file around line 336). in my case the image didn't even get cropped because (i still need to verify that) my server hasn't the GD library installed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我正在创建一个插件来解决这个问题。快完成了,您可以关注 我在 WordPress Stack Exchange 上的相关问题的进度网站。
I am creating a plugin to solve exactly this problem. It's almost done, you can follow the progress on my related question on the WordPress Stack Exchange site.
我认为 WP Post Thumbnail 插件 就是您想要的。
I think the WP Post Thumbnail plugin is what you want.
请看看这个插件,似乎完全满足您的需要:
http://wordpress.org/plugins/manual-image-crop/
Please have a look at this plugin, seems to do exactly what you need:
http://wordpress.org/plugins/manual-image-crop/