Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 2108

Joomla! 5.x Coding • The article image is not added via the Joomla 5 API

$
0
0
The article is recorded in the database without a picture.
In the images field: {}
Please help me solve the problem.

Code:

$url = 'http://localhost/wb/api/index.php/v1/content/articles';$data = [    "title" => "New Article",    "articletext" => "Here is the article text",    "catid" => 8,    "language" => "*",    "images" => json_encode(["image_intro" => "images/sampledata/cassiopeia/nasa1-1200.jpg#joomlaImage://local-images/sampledata/cassiopeia/nasa1-1200.jpg?width=1200&height=400",        "float_intro" => "",        "image_intro_alt" => "alt",        "image_intro_caption" => "caption",        "image_fulltext" => "",        "float_fulltext" => "",        "image_fulltext_alt" => "alt",        "image_fulltext_caption" => "caption"    ])];

Statistics: Posted by veblis — Mon Apr 29, 2024 4:02 pm



Viewing all articles
Browse latest Browse all 2108

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>