code: def image_name(image, key='name', clear=True):
      
      if hasattr(image, 'translation') and image.translation:
          return getattr(image.translation, key)
  
      if hasattr(image, key) and getattr(image, key):
          return getattr(image, key)
  
      try:
          name = IMAGE_NAME.match(image.original_filename).group()
      except IndexError:
          return ''
      else:
          name = name[:-1]
          if clear:
              return name.replace("_", " ").replace("-", " ")
          return name
docs: {{ image|image_name }}
      {{ image|image_name:"description" }}
      {{ image|image_name:"default_caption" }}
      {{ image|image_name:"default_caption" False }}
  
      Return translation or image name