Title: Image Cropper
Author: julioprotzek
Published: <strong>2011 年 7 月 21 日</strong>
Last modified: 2011 年 7 月 21 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/image-cropper.svg)

# Image Cropper

 由 [julioprotzek](https://profiles.wordpress.org/julioprotzek/) 開發

[下載](https://downloads.wordpress.org/plugin/image-cropper.0.3.0.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/image-cropper/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/image-cropper/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/image-cropper/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/image-cropper/#developers)

 [技術支援](https://wordpress.org/support/plugin/image-cropper/)

## 外掛說明

For cropping a post thumbnail image to 200×300 pixels:

    ```
    <?php
        the_post();
        img(200, 300);
    ?>
    ```

This will verify the existence of post thumbnail, crop the image, save it in uploads
folder, and generate an image tag.

To verify the existence of a post thumbnail, you can use `has_img()`

    ```
    <?php if (has_img()): ?>
    <figure>
        <?php img(200, 300) ?>
        <figcaption>Some text</figcaption>
    </figure>
    <?php endif ?>
    ```

To crop images that are not post thumbnails, you can use `crop($url, $size)`

    ```
    <?php
        $cropped_url= crop( get_bloginfo('url') . '/wp-content/uploads/image.jpg', array(200, 300) );
    ?>
    <img src="<?php echo $cropped_url ?>">
    ```

## 安裝方式

 1. Upload `plugin-name.php` to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Done 🙂 Use the new template tags on your theme, eg `<?php the_post(); img(200,
    300); ?>`

## 常見問題集

  When using img(), where does the image come from?

The img() template tag gets the image from your post thumbnail.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Image Cropper〉的開發相關工作。

參與者

 *   [ julioprotzek ](https://profiles.wordpress.org/julioprotzek/)

[將〈Image Cropper〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/image-cropper)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/image-cropper/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/image-cropper/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/image-cropper/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/image-cropper/)。

## 變更記錄

#### 0.3.0

 * First public version.

## 中繼資料

 *  版本 **0.3.0**
 *  最後更新 **15 年前**
 *  啟用安裝數 **30+**
 *  WordPress 版本需求 ** 3.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **3.2.1**
 *  語言
 * [English (US)](https://wordpress.org/plugins/image-cropper/)
 * 標籤:
 * [api](https://tw.wordpress.org/plugins/tags/api/)[cropper](https://tw.wordpress.org/plugins/tags/cropper/)
   [image](https://tw.wordpress.org/plugins/tags/image/)
 *  [進階檢視](https://tw.wordpress.org/plugins/image-cropper/advanced/)

## 評分

這個項目尚無任何評論記錄。

[撰寫評分](https://wordpress.org/support/plugin/image-cropper/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/image-cropper/reviews/)

## 參與者

 *   [ julioprotzek ](https://profiles.wordpress.org/julioprotzek/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/image-cropper/)