update JSON data and organize images