I would have preferred to just suggest some touch ups to your snippet, but there is too much for me to address in your answer as a comment and I'd rather explain fully. Instead, I'll post this new answer which will review and clean up your assumed-working coding attempt for the benefit of you and future researchers.
You are declaring $images = json_decode($...
The solution to my question.
I think is valid:
<?php $images = json_decode($item->images);
<span itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
<link itemprop="url" href="<?php // Create new DOMDocument object.
$dom = new DOMDOcument;
// Load article text into DOMDocument.