Get Image / File URL

Permalink
I have looked all over, but can't find a straight answer to this.

I am working on a block that allows for choosing an image (or file).

Currently, the image picker works and saves just fine. However, I am having trouble getting the URL to display for the selected image. Below is the code I'm using:

$ih = Loader::helper("image");
$img = File::getByID($fID);
<?php echo $img->src ?>

Any ideas as to what I'm missing?

PineCreativeLabs
 
hutman replied on at Permalink Reply
hutman
Take a look at this forum post, this has the legacy method as well as the new 5.7 method mentioned.

http://www.concrete5.org/community/forums/5-7-discussion/image-help...