refactor warning
window.confirm for large image warning