I know it's old question, but I had same problem and this is how it can be solved:
Create your own image node type in your site/plugin and add TYPO3.Neos.NodeTypes:Image
under SuperTypes to have properties already defined there.
'My.Awsome.Plugin:LinkedImage':
superTypes: ['TYPO3.Neos.NodeTypes:Image']
To link internal documents (pages) you can add property of type reference to your My.Awsome.Plugin:LinkedImage (take a look at TYPO3.Neos:Shortcut
definition)
linkToDocument:
type: reference
ui:
label: 'Select document to link'
If you want also link to assets this way, take a look at insert link
in aloha editor - it combines assets and documents - so there are two calls (/neos/service/nodes and /neos/service/asset with proper search term). To have link to asset or to combine both of them you need to create new editor for inspector. Take a look at TYPO3.Neos/Resources/Public/JavaScript/Content/Inspector/Editors/ReferenceEditor.js
- for assets it will be copy paste with nodesEndpoint action changed to assetAction. Last thing is, that to have editor defined from your own package working, you need to add to main Settings yaml this:
userInterface:
requireJsPathMapping:
'My.Awsome.Plugin/Inspector/Editors': 'resource://My.Awsome.Plugin/Public/JavaScript/Content/Inspector/Editors'
and for property linkToAsset in NodeTypes.yaml, set editor under inspector like that
editor: 'My.Awsome.Plugin/Inspector/Editors/AssetReferenceEditor'
- To handle showing it in popup, just adjust html for your node type template and use javascript.