Jump to content

Image description


Frank Vèssia
 Share

Recommended Posts

For adding description to an image from API i use this code but i think it's to tricky because i need to save again the page for adding it....

<?php
...
$link->save();
if ($input->post->imageurl){
$link->images->add("..".$input->post->imageurl);
$link->save();
if ($input->post->alt){
	$link->images->first()->description = $input->post->alt;
	$link->save();
}
}

is there an easier way to do that?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...