wordpress的缩略图后裁剪问题。这有可能吗? [英] wordpress post-thumbnail crop question. is this even possible?

查看:85
本文介绍了wordpress的缩略图后裁剪问题。这有可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在wp3中使用帖子缩略图功能并将缩略图尺寸设置为例如230x160 wp将图像从左上角裁剪到设置的大小。

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.

有什么办法让后端用户有机会选择原始图像中应该是缩略图的部分吗?像jQuery脚本之类的东西?

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...

对此有任何想法吗?

// EDIT

我只是想而已我在这里错了。裁剪功能通常会占据图像的中间部分(如您在第336行的wp-includes / media.php文件中所见)。在我的情况下,图像甚至没有被裁剪,因为(我仍然需要验证)我的服务器尚未安装GD库。

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.

推荐答案

我正在创建一个插件来解决此问题。快完成了,您可以在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.

这篇关于wordpress的缩略图后裁剪问题。这有可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆