sending photo info to js