Only jpeg files are taken into account now.