glTF embedding: handle missing image on a better way

Using empty tree leads to empty image url which
cause problem.

Change-Id: If815ce588fb303905035185404ede93fa424fcba