moved image visibility to js file instead of dart