Title: Image Cropper
Author: julioprotzek
Published: <strong>21 de juliol de 2011</strong>
Last modified: 21 de juliol de 2011

---

Cerca extensions

Aquesta extensió **no s’ha provat en les darreres 3 versions majors del WordPress**.
Segurament no està mantinguda o suportada, i pot tenir problemes de compatibilitat
quan s’usa en versions recents del WordPress.

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

# Image Cropper

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

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

 * [Detalls](https://ca.wordpress.org/plugins/image-cropper/#description)
 * [Ressenyes](https://ca.wordpress.org/plugins/image-cropper/#reviews)
 *  [Instal·lació](https://ca.wordpress.org/plugins/image-cropper/#installation)
 * [Desenvolupament](https://ca.wordpress.org/plugins/image-cropper/#developers)

 [Suport](https://wordpress.org/support/plugin/image-cropper/)

## Descripció

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

## Instal·lació

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

## PMF

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

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

## Ressenyes

No hi ha ressenyes per a aquesta extensió.

## Col·laboradors i desenvolupadors

«Image Cropper» és programari de codi obert. La següent gent ha col·laborat en aquesta
extensió.

Col·laboradors

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

[Traduïu «Image Cropper» a la vostra llengua.](https://translate.wordpress.org/projects/wp-plugins/image-cropper)

### Interessats en el desenvolupament?

[Navegueu pel codi](https://plugins.trac.wordpress.org/browser/image-cropper/), 
baixeu-vos el [repositori SVN](https://plugins.svn.wordpress.org/image-cropper/),
o subscriviu-vos al [registre de desenvolupament](https://plugins.trac.wordpress.org/log/image-cropper/)
per [fisl de subscripció RSS](https://plugins.trac.wordpress.org/log/image-cropper/?limit=100&mode=stop_on_copy&format=rss).

## Registre de canvis

#### 0.3.0

 * First public version.

## Meta

 *  Versió **0.3.0**
 *  Darrera actualització **fa 15 anys**
 *  Instal·lacions actives **30+**
 *  Versió del WordPress ** 3.0 o posterior **
 *  Provada fins a **3.2.1**
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/image-cropper/)
 * Etiquetes
 * [api](https://ca.wordpress.org/plugins/tags/api/)[cropper](https://ca.wordpress.org/plugins/tags/cropper/)
   [image](https://ca.wordpress.org/plugins/tags/image/)
 *  [Vista avançada](https://ca.wordpress.org/plugins/image-cropper/advanced/)

## Valoracions

Encara no s'ha enviat cap ressenya.

[La vostra ressenya](https://wordpress.org/support/plugin/image-cropper/reviews/#new-post)

[Visualitza totes les ressenyes](https://wordpress.org/support/plugin/image-cropper/reviews/)

## Col·laboradors

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

## Suport

Teniu quelcom a dir? Necessiteu ajuda?

 [Visualitza els fòrums de suport](https://wordpress.org/support/plugin/image-cropper/)