IMPROVED: supports jpeg icons