Get Image

Note: This version only works on WordPress 2.6. If you wants to use on wordpress 2.5, please get
the version 0.5 on download repository.
Take the last image daughter of a post. To use this plugin you just need to insert one of
the following commands in your template:
gi_fullsize ();gi_medium ();gi_thumbnail ();
Adding a parameter, it becames in the tag img generated. By default, the plugin will return
a string containing the tag of the image, but you can pass the second parameter to true to
make the impression of this string.
Updated in version 0.5
Now you have a gi_library () function. It returns all images from yout post – not only the
last daughter, where you can pass some parameters like size and type of return you wants.
The sizes of gi_library () are: ‘all’, ‘fullsize’, ‘medium’, ‘thumbnail’
Upgraded in version 0.8
Added shortcuts for gi_thumb () and gi_full().
Upgraded for wordpress 2.6
Added width and height in gi_library.
Using the native wp_get_attachment_image () function.
Upgraded in version 0.9
Now, gi_fullsize(), gi_full(), gi_medium(), gi_thumbnail() and gi_thumb() recives two parameters.
The first is $print, this param prints the return, use it to shorcur yours call. So, if you wants
to print do not use:
<?php echo gi_full(); ?>
But use:
<?php gi_full(1); ?>
The second param says the number of image you want to use. This number is the number of image in
galery order. The next code prints the third image in galery on format thumbnail.
<?php gi_thumb(true, 3); ?>
The function gi_library() have shortcuts for thumb and full sizes. Now you can use
gi_library(‘thumb’) or gi_library('full') in your templates/scripts.
Upgrated in version 1.0
Now the function gi_library() on mode brute_array returns the post_ID, title, caption and description
from the image.
Download & install the zip archive
The plugin package installer can be downloaded from the WP2E project tab called “code”.
1 – Select the version to download if this option is available otherwise the “latest” version of the main plugin will be used.
2 – After downloading the zip archive install the plugin package installer in you local environment and activate the script from the plugin list.
3 – Under the section “Plugins” of the admin dashboard you should see a new “Dependencies & Licenses” link. Follow the instructions from this panel to finalize the installation of the missing dependencies.
- Give a name to your project
- Download the Installer Package
- Install & activate the plugin locally
- Install the suggested dependencies
Tips: Use the WP2E panel to add/suggest new dependencies to the local installation. Press F5 in the list of dependencies if the changes are not displayed right away.



