Get the Image
[resolved] Get the full image url parameter? (3 posts)

  1. Abdelhadi Touil
    Posted 3 years ago #

    Thanks for this great plugin, I use it in all my themes now.
    I was looking for a parameter to get the full url image, but I didn't find it, so can you add it please in the next version?
    I mean I want a way to make the plugin retrive the full image url to use it in some situations, like in a slider for example.


  2. miguelesquirol
    Posted 3 years ago #

    After fighting like crazy I finally managed to hack something together... I couldn't touch the plugins files or the function file (and I´m not really good at PHP). BUt I managed to strip everything from the code that get_the_image gives you and leave the actual image URL.

    What I wanted to do here is to have a direct link to the image (instead of a link to the page where the image is). I'm sure there are better methods but this is mine.

    $text =  get_the_image( array( 'custom_key' => array( 'thumbnail' ), 'echo' => false, 'link_to_post' => false,'size' => 'full') ); ;
    $matches = $matches[1];
    $list = array();
    foreach($matches as $var)
       print("<a href='".$var."' rel='lightbox'>");
    	    <li class="post-<?php the_ID(); ?> thumb-big"><?php get_the_image( array( 'custom_key' => array( 'thumbnail' ),  'link_to_post' => false,'default_size' => '320x320',  'width' => '320', 'height' => '320' ) ); ?></li></a>
  3. Abdelhadi Touil
    Posted 3 years ago #

    Thanks for you reply miguelesquirol, I'll try to choose what I want from your code and try it.
    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Get the Image
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.