return newest and oldest ids with the pictures urls