You not only need to add the resources to your shared resources, you need to register a resource reference to access it (at this point I assume you made sure that imageData
contains the correct data)
getSharedResources().add("resourcePath", imageData);
mountResource("resourcePath", new SharedResourceReference("resourceName"));
After that you can access the shared resource everywhere in the code by using
new SharedResourceReference("resourceName")