Title: Use the Attachment Image!
Author: Tom Lany
Published: <strong>2010年2月11日</strong>
Last modified: 2021年4月9日

---

プラグインを検索

このプラグインは **WordPress の最新3回のメジャーリリースに対してテストされていま
せん**。もうメンテナンスやサポートがされていないかもしれず、最新バージョンの WordPress
で使用した場合は互換性の問題が発生する可能性があります。

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

# Use the Attachment Image!

 作者: [Tom Lany](https://profiles.wordpress.org/tomthewebmaster/)

[ダウンロード](https://downloads.wordpress.org/plugin/use-the-attachment-image.zip)

 * [詳細](https://ja.wordpress.org/plugins/use-the-attachment-image/#description)
 * [レビュー](https://ja.wordpress.org/plugins/use-the-attachment-image/#reviews)
 *  [インストール](https://ja.wordpress.org/plugins/use-the-attachment-image/#installation)
 * [開発](https://ja.wordpress.org/plugins/use-the-attachment-image/#developers)

 [サポート](https://wordpress.org/support/plugin/use-the-attachment-image/)

## 説明

Use the Attachment Image! allows the first attachment image associated with a post
to be displayed nearly anywhere on a blog, simply by adding a special function to
a loop. This plugin is a perfect compliment for magazine themes.

This plugin can include images of nearly any size, simply by using the included `
<?php use_the_attachment_image(); ?>` function. See the installation page for more
details regarding usage.

## インストール

To utilize this plugin, you will first need to upload `use_attachment_image.php`
to the `/wp-content/plugins/` directory on your web server; and activate the plugin
through the ‘Plugins’ menu in WordPress.

Next, place `<?php use_the_attachment_image() ?>` (will include a link to the post),
or `<?php use_the_attachment_image_nolink() ?>` (will NOT include a link to the 
post) in your template to include a thumbnail of the first attachment image. Note
the function must be inside of a WordPress loop.

By default, this function will include a thumbnail image. To include images of different
sizes, use the respective functions below. You may also use `<?php use_the_attachment_image_nolink()?
>` in place of `<?php use_the_attachment_image() ?>` here.

**Thumbnail** `<?php use_the_attachment_image('thumbnail'); ?>`
 **Medium** `<?php
use_the_attachment_image('medium'); ?></p>` **Large** `<?php use_the_attachment_image('
large'); ?></p>` **Full** `<?php use_the_attachment_image('full'); ?>` **20 px**`
<?php use_the_attachment_image(array(20,20)); ?>` Feel free to replace 20px with
another specific size to best meet your needs. Note that WordPress will scale a 
larger image down to give you the size you desire here.

It is possible to include a thumbnail image from each post in your RSS feed. To 
do this, simply add this code to your theme’s functions.php file. From [cd harrison](http://cdharrison.com/2009/12/16/the_post_thumbnail-for-rss-feeds/).

    ```
    <?php
    if (function_exists('use_the_attachment_image')) {
        function insertAttachmentRSS($content) {
            global $post;
            { $content = use_the_attachment_image() . $content; }
            return $content;
        }
        add_filter('the_excerpt_rss', 'insertAttachmentRSS');
        add_filter('the_content_feed', 'insertAttachmentRSS');
    }
    ?>
    ```

See [an example of how this plugin can be used](https://tomlany.net/attachment-image-test/).

## 評価

このプラグインにはレビューがありません。

## 貢献者と開発者

Use the Attachment Image! はオープンソースソフトウェアです。以下の人々がこのプラグ
インに貢献しています。

貢献者

 *   [ Tom Lany ](https://profiles.wordpress.org/tomthewebmaster/)

[“Use the Attachment Image!” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/use-the-attachment-image)

### 開発に興味がありますか ?

[コードを閲覧](https://plugins.trac.wordpress.org/browser/use-the-attachment-image/)
するか、[SVN リポジトリ](https://plugins.svn.wordpress.org/use-the-attachment-image/)
をチェックするか、[開発ログ](https://plugins.trac.wordpress.org/log/use-the-attachment-image/)
を [RSS](https://plugins.trac.wordpress.org/log/use-the-attachment-image/?limit=100&mode=stop_on_copy&format=rss)
で購読してみてください。

## 変更履歴

#### 1.02

 * The code that includes the post image in an RSS feed was taken out of the plugin
   and moved to the readme file; as it did not previously work when it was included
   in a separate file from the plugin file as was suggested in the plugin instructions.

#### 1.01

 * Fixed the function name in the documentation. In a few cases, a function that
   did not exist was referenced. Thanks, [Matias](http://www.taringacs.net/) for
   the report. The actual plugin was not changed.

#### 1.0

 * 最初のリリース。

## メタ

 *  バージョン **1.02**
 *  最終更新日 **6年前**
 *  有効インストール数 **20+**
 *  WordPress バージョン ** 2.7またはそれ以降 **
 *  検証済み最新バージョン: **5.7.21**
 *  言語
 * [English (US)](https://wordpress.org/plugins/use-the-attachment-image/)
 * タグ
 * [attachment image](https://ja.wordpress.org/plugins/tags/attachment-image/)[image](https://ja.wordpress.org/plugins/tags/image/)
   [magazine](https://ja.wordpress.org/plugins/tags/magazine/)[thumbnail](https://ja.wordpress.org/plugins/tags/thumbnail/)
 *  [詳細を表示](https://ja.wordpress.org/plugins/use-the-attachment-image/advanced/)

## 評価

 5つ星中5つ星

 *  [  3 5-星レビュー     ](https://wordpress.org/support/plugin/use-the-attachment-image/reviews/?filter=5)
 *  [  0 4-星レビュー     ](https://wordpress.org/support/plugin/use-the-attachment-image/reviews/?filter=4)
 *  [  0 3-星レビュー     ](https://wordpress.org/support/plugin/use-the-attachment-image/reviews/?filter=3)
 *  [  0 2-星レビュー     ](https://wordpress.org/support/plugin/use-the-attachment-image/reviews/?filter=2)
 *  [  0 1-星レビュー     ](https://wordpress.org/support/plugin/use-the-attachment-image/reviews/?filter=1)

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

[すべてのレビューを見る](https://wordpress.org/support/plugin/use-the-attachment-image/reviews/)

## 貢献者

 *   [ Tom Lany ](https://profiles.wordpress.org/tomthewebmaster/)

## サポート

意見や質問がありますか ?

 [サポートフォーラムを表示](https://wordpress.org/support/plugin/use-the-attachment-image/)