I want to get the image detail by its ID rather than the URL. Here is my code that is not working.
List page {exp:channel:entries channel="gallery"}
{gallery_images}
<li>
<a href="/gallery/detail/{image:id}/"><img src="{image:url:medium}" class="img" alt="{image:title}"></a>
</li>
{/gallery_images}
{/exp:channel:entries}
Detailed Page
{exp:channel:entries channel="gallery"} {exp:channel_images:images segment_3="{image:id}"} {/exp:channel_images:images}
Thanks