Generating a JSON to load text and images