assistant.bones.image ===================== .. py:module:: assistant.bones.image Classes ------- .. autoapisummary:: assistant.bones.image.ImageBoneRelSkel assistant.bones.image.ImageBone Module Contents --------------- .. py:class:: ImageBoneRelSkel Bases: :py:obj:`viur.core.skeleton.RelSkel` RelSkel designed to use as using skeleton in a ``ImageBone``. .. py:attribute:: alt .. py:class:: ImageBone(*, using = ImageBoneRelSkel, validMimeTypes = ('image/*', ), enable_describe_image = True, **kwargs) Bases: :py:obj:`viur.core.bones.FileBone` A specialized ``FileBone`` for image files. This bone type extends ``FileBone`` by: - Restricting accepted MIME types to images (by default). - Has a using skel with an alt ``StringBone``. - Optionally enabling the *Describe Image* bone action, which allows AI to generate an alt-text or caption for the uploaded image via an admin-triggerable action. Initialize an ImageBone, a file-based bone specialized for handling image uploads. Optionally adds a bone action that allows AI-based image description (alt-text generation) to be triggered from within the admin interface. :param using: The relational skeleton class used for additional data of this image. Defaults to ``ImageBoneRelSkel``, including the alt ``StringBone``. :param validMimeTypes: A list of accepted MIME types. Defaults to only allow image types (``("image/*",)``). :param enable_describe_image: If ``True``, the bone will include the ``DESCRIBE_IMAGE`` bone action, allowing AI-assisted image description via the vi-admin UI. :param kwargs: Additional keyword arguments passed to the base ``FileBone``. .. py:attribute:: type