Get attachment images does not return any attached images

For this feature to work the images must be uploaded to the media library from that page. In other words, clicking the “Add Media” button and adding images already in your media library won’t do it. You must click “Add Media” then “Upload Images” and add them to the page.