next_image_link()WP 2.5.0

Displays a link to the next image attached to the post.

No Hooks.

Returns

null. Ready HTML A tag.

Usage

<?php next_image_link( $size, $text ); ?>
$size(string/array)
The size of the image the link should point to.
Default: 'thumbnail'
$text(string)
The text (anchor) of the link.
Default: false

Examples

0

#1 Basic example

<div class="alignright"><?php next_image_link() ?></div>
0

#2 More examples

See the identical function previous_image_link().

Changelog

Since 2.5.0 Introduced.

next_image_link() code WP 6.8.3

function next_image_link( $size = 'thumbnail', $text = false ) {
	echo get_next_image_link( $size, $text );
}