Refactor the following Python code to improve its readability and make it easier to maintain:
images = list()
for item in allitems:
 if item.endswith('.jpg'):
 images.append(item)
images = [item for item in allitems if item.endswith('.jpg')]