code: def get_image_details(self):
          '''
          Create a reference of site images by hash
  
          If there are duplicate images, only store the first
          and create warnings for other images
          '''
          if Image.objects.count() == 0:
              return None
  
          total = Image.objects.count()
          count = 1
          for local_image in Image.objects.all():
              if not hasattr(local_image, 'image_info'):
                  ImageInfo.objects.create(image=local_image)
                  local_image.refresh_from_db()
  
              hash_ = local_image.image_info.image_hash
  
              if hash_ in self.image_hashes:
                  self.log(WARNING, "Image found with matching hash", context={
                      "composite hash": hash_,
                      "hashed image ID": self.image_hashes[hash_].id,
                      "matching image ID": local_image.id,
                  })
              else:
                  self.image_hashes[hash_] = local_image
  
              self.log(ACTION, "{}/{} images processed".format(count, total))
              count += f get_image_details(self):
          '''
          Create a reference of site images by hash
  
          If there are duplicate images, only store the first
          and create warnings for other images
          '''
          if Image.objects.count() == 0:
              return None
  
          total = Image.objects.count()
          count = 1
          for local_image in Image.objects.all():
              if not hasattr(local_image, 'image_info'):
                  ImageInfo.objects.create(image=local_image)
                  local_image.refresh_from_db()
  
              hash_ = local_image.image_info.image_hash
  
              if hash_ in self.image_hashes:
                  self.log(WARNING, "Image found with matching hash", context={
                      "composite hash": hash_,
                      "hashed image ID": self.image_hashes[hash_].id,
                      "matching image ID": local_image.id,
                  })
              else:
                  self.image_hashes[hash_] = local_image
  
              self.log(ACTION, "{}/{} images processed".format(count, total))
              count += 1
docs: Create a reference of site images by hash
  
          If there are duplicate images, only store the first
          and create warnings for other images