get intro-image from article?

by laendle   Last Updated May 15, 2019 23:10 PM

I do not get the images out of my article. The article var is initialized, but the images and pictures vars seem to be empty. Any hints what I do wrong here?

<?php
   $id = JFactory::getApplication()->input->getInt('id');
   $article = JTable::getInstance("content");
   $article->load($id);
   $images = $article->item->images;
   echo $images;
   $pictures = json_decode($images);
   echo $pictures;
?>

<?php echo $pictures->image_intro; ?>


Related Questions


Updated April 28, 2015 00:04 AM

Updated October 04, 2016 09:04 AM

Updated January 28, 2019 14:10 PM

Updated May 18, 2015 21:04 PM

Updated September 05, 2016 08:06 AM