Skip to content

Module · Veva.Modules.Assets

Upload once, fit anywhere.

One media library for every file on the site. Folders give files stable /library/ addresses, and each image is resized, cropped and sharpened on the server for the place it appears.

dotnet add package Veva.Web.Essentials

What it does

Every file, one library.

Folders are addresses

A folder's alias puts its files at /library/folder/file. The permanent link, /library/?itemid=, never changes.

Images sized on request

Add width, fit, cover, crop or sharpen actions to an image's address and get that version back.

Rules per folder

A folder can accept one file type only, and run an image procedure on every image uploaded to it.

Focus points

Save a focus point on an image, so crops keep what matters.

Metadata, handled

EXIF and IPTC are read into the library. Processed images leave GPS and other metadata out.

Stock photos

The Unsplash and Pexels modules add a tab to the Add Content dialog, so editors pick photos in place.

How it works

From an upload to the right size.

  1. 01

    Upload

    In the admin, from a url, from Unsplash or Pexels, or over MCP.

  2. 02

    File it

    The folder's alias, file type and image procedure apply.

    Image procedure
  3. 03

    Ask for a size

    Add actions to the address, such as &action=cover:800x800.

    /library/?itemid=
  4. 04

    Made once

    The server makes that version on its first request and keeps it.

  5. 05

    Place it

    In an Image component, or as {image.FriendlyUrl} in a document.

For developers

Image addresses in your components.

IAssetUrlService builds the address of an asset at the size you need, from a property or from a document field in the data binding.

Extension points

API

Change how images are made or where files come from. In Veva.Modules.Assets.Domain:

  • IImageProcedureStepHandler: one step of an image procedure
  • IActionParser: turns URL actions into steps
  • IMetaDataService: reads metadata from files
  • IAssetSource: a source of files in the Add Content dialog
Photo.razor
@inject IAssetUrlService AssetUrls

<img src="@ImageUrl()" alt="@Image?.Description" loading="lazy" />

@code {
    [EditorBrowsable, Parameter, DisplayName("Image")]
    public AssetProperty Image { get; set; }

    // 800px wide, lightly sharpened
    private string ImageUrl() =>
        Image?.AssetId is Guid id && id != Guid.Empty
            ? AssetUrls.GetAssetUrl(
                id, 800, null, ResizeMode.Fit, SharpenStrength.Light)
            : null;
}

Keep reading

Guides for this module.

All articles

Guide

Image actions

Resize, crop and sharpen images through their address.

Read the guide

Modules

What it is made of.

The ones marked Built in come with Veva.Web.Essentials. Add the others as packages, restart, and set them up in the site's settings.

Module library

Assets

Veva.Modules.Assets

The media library, with files at /library addresses and images resized, cropped and sharpened on request. Adds the Image, Images, Video and Audio components.

Built in
dotnet add package Veva.Modules.Assets

PDF files

Veva.Modules.Pdf.PDFPig

Lets the crawler index PDF files, and reads their metadata when they are uploaded to the library.

Add-on
dotnet add package Veva.Modules.Pdf.PDFPig

Unsplash

Veva.Modules.Unsplash

Adds Unsplash photos to the Add Content dialog.

Add-on
dotnet add package Veva.Modules.Unsplash

Pexels

Veva.Modules.Pexels

Adds Pexels photos and videos to the Add Content dialog.

Add-on
dotnet add package Veva.Modules.Pexels

More of Veva

Explore the other features.

Each one is made of modules. Reference a package, restart, and its components are in the editor.

All features

Page builder

Compose pages from components, then preview and publish

Open

Components and data

Components that show, components that fetch, and the binding between them

Open

Documents

Structured content you list, filter and serve anywhere

Open

Forms

Document forms that save, generic forms that filter or post

Open

PDFs and signing

Form answers made into a PDF, downloaded or sent to be signed

Open

Search

Crawl, index and search the whole site

Open

AI and agents

The admin's AI assistant, and the MCP server coding agents connect to

Open

Veva core

BuildVeva(), modules, components, themes and hooks

Open

Tech stack

Plain .NET Blazor: three render modes, standard components

Open

Integrations

Data sources, sign-in, mail, analytics and media

Open

Module library

Every module: what comes with Essentials, and the add-ons

Open

Type to search the docs, components and API.

↑↓ to move ↵ to open Esc to close Search by Veva