support both jpg and png images #1