Title: Image Cropper
Author: julioprotzek
Published: <strong>21 Tháng 7, 2011</strong>
Last modified: 21 Tháng 7, 2011

---

Tìm kiếm plugin

Plugin này **chưa được cập nhật với 3 phiên bản mới nhất của WordPress**. Nó có 
thể không được hỗ trợ và bảo trì, và có thể xung đột với các phiên bản WordPress
mới nhất.

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

# Image Cropper

 Bởi [julioprotzek](https://profiles.wordpress.org/julioprotzek/)

[Tải về](https://downloads.wordpress.org/plugin/image-cropper.0.3.0.zip)

 * [Chi tiết](https://vi.wordpress.org/plugins/image-cropper/#description)
 * [Đánh giá](https://vi.wordpress.org/plugins/image-cropper/#reviews)
 *  [Cài đặt](https://vi.wordpress.org/plugins/image-cropper/#installation)
 * [Nhà phát triển](https://vi.wordpress.org/plugins/image-cropper/#developers)

 [Hỗ trợ](https://wordpress.org/support/plugin/image-cropper/)

## Mô tả

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 ?>">
    ```

## Cài đặt

 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); ?>`

## Hỏi đáp

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

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

## Đánh giá

Không có đánh giá nào cho plugin này.

## Người đóng góp & Lập trình viên

“Image Cropper” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp

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

[Dịch “Image Cropper” sang ngôn ngữ của bạn.](https://translate.wordpress.org/projects/wp-plugins/image-cropper)

### Muốn tham gia phát triển?

[Duyệt code](https://plugins.trac.wordpress.org/browser/image-cropper/), check out
[SVN repository](https://plugins.svn.wordpress.org/image-cropper/), hoặc theo dõi
[nhật ký phát triển](https://plugins.trac.wordpress.org/log/image-cropper/) qua 
[RSS](https://plugins.trac.wordpress.org/log/image-cropper/?limit=100&mode=stop_on_copy&format=rss).

## Nhật ký thay đổi

#### 0.3.0

 * First public version.

## Meta

 *  Phiên bản **0.3.0**
 *  Cập nhật lần cuối **15 năm trước**
 *  Số lượt cài đặt **40+**
 *  Phiên bản WordPress ** 3.0 hoặc cao hơn **
 *  Đã kiểm tra lên đến **3.2.1**
 *  Ngôn ngữ
 * [English (US)](https://wordpress.org/plugins/image-cropper/)
 * Thẻ
 * [api](https://vi.wordpress.org/plugins/tags/api/)[cropper](https://vi.wordpress.org/plugins/tags/cropper/)
   [image](https://vi.wordpress.org/plugins/tags/image/)
 *  [Nâng cao](https://vi.wordpress.org/plugins/image-cropper/advanced/)

## Đánh giá

Chưa có đánh giá nào được gửi.

[Your review](https://wordpress.org/support/plugin/image-cropper/reviews/#new-post)

[Xem tất cả đánh giá](https://wordpress.org/support/plugin/image-cropper/reviews/)

## Những người đóng góp

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

## Hỗ trợ

Có điều gì muốn nói? cần giúp đỡ?

 [Xem diễn đàn hỗ trợ](https://wordpress.org/support/plugin/image-cropper/)