开发者

does wordpress image cropping rely on some php library?

quick question:

i'm developing a wordpress theme for a client and have a heavy use of the_post_thumbnail function.

now, on my local dev site (running under MAMP) everything works like a charm and all the images get hard cropped to the co开发者_如何学Pythonrrect size.

on the live dev site the cropping is completly ignored by wordpress. the output of the image is

.../wp-content/uploads/2010/06/07.jpg

but it should be

...wp-content/uploads/2010/06/07-160x230.jpg

after i changed my settings on the live/local dev site i used the ajax-thumbnail-rebuild plugin to rebuild all the images.. it just wont work on the live site.

now i read somewhere that the wordpress hard crop function relies on some php library calld php_hd2. can anyone confirm this?

//UPDATE

Thanks to Fredleys link it seems to be the GD library i meant. Which is installed on my server. sadly in the comments on the link people still have the problem despite GD being installed (which i can confirm for my server tomorrow).

But there is one interesting comment in there on the end of fredleys link:

wp_get_attachment_metadata() returns a hash without 'sizes' key. And that hash is returned by a call to apply_filters()

which sounds like my problem. i have all options in the backend available, nothing greyed out, and the images are available on the server.. they just won't get called on the frontend.

// UPDATE 2 & SOLVED

Ok. Found the Problem. The Server is running on Debian which has the gd_lib installed - BUT not the bundled Version. So there are things missing in this package. If you need to install the right version of gd_lib on Debian you'll find a nice solution here.


I think you mean gd2 and yes, you need to have it installed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜