I'm trying to get Article's intro Image in Joomla 3.3 I found this code and it's not working:
$article = JTable::getInstance("content");
$article->load(JRequest::getInt("id")); // Get Article ID
$article_images = $article->get("images"); // Get image parameters
$pictures = json_decode($article_images); // Split the parameters apart
// Print the image
echo "<img src='" . $pictures->{'image_intro'} . "' alt='" . $pictures->{'image_intro_alt'} . "'>";
I got info that JRequest::getInt
is depreciated and i when i'm trying to var dump $pictures
i got null. Can somebody tell me how to get 1 intro image by article id ?