In order for the gallery element to work, please make sure you have properly configured the File Upload Preferences in EE.

The {gallery} tag pair will output the contents of the gallery element.

{gallery}
	{if images}
		{images}
			Thumbnail: <img src="{thumb}" /><br />
			Original: <img src="{image}" /><br />
			Image type: {extension}<br />
			Image size: {size}<br />
			Image width: {width}<br />
			Image height: {height}<br />
			Caption: {caption}<br />
                {/images}
        {/if}
{/gallery}

The following tag pairs are available within your {galllery} tag pair:

{images}

This tag pair displays (loops) individual images from your gallery.

The following single variables are available within your {gallery} tag pair:

{image}

Returns URL address of the original image.

{thumb}

Returns URL address of the thumbnail.

{caption}

Returns image caption.

{url}

Returns image URL entered by user.

{extension}

Returns image file type. Supported image file types include:

  • gif
  • png
  • jpg
  • jpeg

{size}

Returns image file size, eg. 28.51kB.

{width}

Returns image width.

{height}

Returns image height.

{element_name}

Sometimes, you might want to use several gallery elements. The {element_name} tag will help you to determine which gallery element is being displayed.

{gallery}
	{if element_name=="Images in Frames"}
		{!-- show gallery with images in frames --}
	{if:else}
		{!-- show default gallery styles --}
	{/if}
{/gallery}

{count}

Returns the current image’s count.

{image:medium}

From EE 2.2.0+, you can use this tag provided you set Image Manipulations to “medium” in File Upload Preferences and synchronized images in your folder.

You can use the following parameters with your {images} tag pair:

limit=

{images limit="5"}
   {!-- this will show only 5 images --}
{/images}

This parameter limits the number of images displayed.

offset=

{images offset="2"}
   {!-- this will start from second image, first will be skipped --}
{/images}

This parameter skips the first X images.