img preview fix