Something you have on API side which is simple really.
$p = $pages->get(1001);
$p->of(true); // if in a template code, turn off output formatting
$p->images->add("http://placehold.it/350x150.jpg");
$p->save();
$p->of(false);
Everything is possible. With a simple module.
As a basic start add a text or url field to the template near your "images" field, like a text field "add_images_url"
Now with a autoload module (like site/modules/HelloWorld.module) you add a hook to when the field has url it will store it to the "images" field (or any on the page). All you need is to enter url and save page.
<?php
/**
* AddImagesFromUrl
*
* On a page with fields
* "add_images_url" text field
* "images" images field
*
*/
class AddImagesFromUrl extends WireData implements Module {
public static function getModuleInfo() {
return array(
'title' => 'AddImagesFromUrl',
'version' => 101,
'summary' => 'Add images from url to images field',
'href' => 'http://www.processwire.com',
'singular' => true,
'autoload' => "template=admin",
'icon' => 'smile-o',
);
}
public function init() {
$this->addHookAfter('Pages::saveReady', $this, 'addImage');
}
public function addImage(HookEvent $event) {
$page = $event->arguments("page");
if($page->template != "basic-page") return;
if(!$page->add_images_url) return;
// now interesting part, anything is possible here
if(strpos($page->add_images_url, ".jpg") != false) {
$page->images->add($page->add_images_url);
$this->message("Added image from '$page->add_images_url' to images field");
$page->add_images_url = '';
}
}
}
https://gist.github.com/somatonic/49f9e0a7faa8f6e6cfa3