def METHOD_NAME(work_package):
    (
        existing_encrypted_thumbnail,
        converted_encrypted_thumbnail,
        passphrase,
    ) = work_package
    try:
        gpg = gnupg.GPG(gnupghome=settings.GNUPG_HOME)
        logger.info(f"Decrypting thumbnail: {existing_encrypted_thumbnail}")
        # Decrypt png
        decrypted_thumbnail = existing_encrypted_thumbnail.with_suffix("").resolve()
        with open(existing_encrypted_thumbnail, "rb") as existing_encrypted_file:
            raw_thumb = gpg.decrypt_file(
                existing_encrypted_file,
                passphrase=passphrase,
                always_trust=True,
            ).data
            with open(decrypted_thumbnail, "wb") as decrypted_file:
                decrypted_file.write(raw_thumb)
        converted_decrypted_thumbnail = Path(
            str(converted_encrypted_thumbnail).replace("webp.gpg", "webp"),
        ).resolve()
        logger.info(f"Converting decrypted thumbnail: {decrypted_thumbnail}")
        # Convert to webp
        run_convert(
            density=300,
            scale="500x5000>",
            alpha="remove",
            strip=True,
            trim=False,
            auto_orient=True,
            input_file=f"{decrypted_thumbnail}[0]",
            output_file=str(converted_decrypted_thumbnail),
        )
        logger.info(
            f"Encrypting converted thumbnail: {converted_decrypted_thumbnail}",
        )
        # Encrypt webp
        with open(converted_decrypted_thumbnail, "rb") as converted_decrypted_file:
            encrypted = gpg.encrypt_file(
                fileobj_or_path=converted_decrypted_file,
                recipients=None,
                passphrase=passphrase,
                symmetric=True,
                always_trust=True,
            ).data
            with open(converted_encrypted_thumbnail, "wb") as converted_encrypted_file:
                converted_encrypted_file.write(encrypted)
        # Copy newly created thumbnail to thumbnail directory
        shutil.copy(converted_encrypted_thumbnail, existing_encrypted_thumbnail.parent)
        # Remove the existing encrypted PNG version
        existing_encrypted_thumbnail.unlink()
        # Remove the decrypted PNG version
        decrypted_thumbnail.unlink()
        # Remove the decrypted WebP version
        converted_decrypted_thumbnail.unlink()
        logger.info(
            "Conversion to WebP completed, "
            f"replaced {existing_encrypted_thumbnail.name} with {converted_encrypted_thumbnail.name}",
        )
    except Exception as e:
        logger.error(f"Error converting thumbnail (existing file unchanged): {e}")