Media Library

The Media Library is the central store for all uploaded images and files in Pubvana.

TL;DR

  • Admin → Media — view, upload, search, and delete media files.
  • Drag-and-drop or file picker upload. Images are auto-converted to WebP on upload.
  • Click any item to get its public URL for use in post content.
  • Used for setting featured images on posts.

Details

Accessing the Media Library

Navigate to Admin → Media. Files are displayed in a responsive grid with thumbnails for images. Use the search box to filter by filename or title.

Uploading Files

Two upload methods are supported:

  • Drag and drop — drag one or more image files from your desktop onto the upload area at the top of the page.
  • File picker — click the Upload button to open a standard file picker dialog.

Supported formats: JPG, JPEG, PNG, GIF, WebP. Maximum upload size is determined by your PHP upload_max_filesize and post_max_size settings (typically 8MB by default — adjust in php.ini if needed).

Automatic WebP Conversion

On upload, Pubvana automatically converts JPG, JPEG, and PNG images to WebP format using PHP's GD library. WebP files are significantly smaller than their JPEG or PNG equivalents, improving page load times without visible quality loss.

The converted WebP file is stored in writable/uploads/ alongside the original. The media record points to the WebP version.

Note: WebP conversion requires the gd PHP extension with WebP support compiled in. If conversion fails, the original file is stored instead.

Media Item Details

Each media item records the following fields:

FieldDescription
filenameThe stored filename on disk
pathRelative path from the site root
mime_typeThe file MIME type
sizeFile size in bytes
titleOptional human-readable title
alt_textAlt text for accessibility and SEO
uploaded_byThe user ID of the uploader

Click any media item in the grid to open its detail panel where you can edit the title and alt text, copy the public URL, or delete the item.

Using Media in Posts

Featured image: In the post editor, click Set Featured Image in the sidebar. A modal opens showing the Media Library grid. Click any image to select it as the featured image.

Inline images: Copy the public URL of any media item from its detail panel, then paste it into your post content (Markdown: ![alt text](URL), HTML: standard <img> tag in Summernote).

Deleting Media

Click the Delete button in the media item detail panel. This permanently removes both the database record and the file from disk. Make sure the media item is not in use as a featured image before deleting — orphaned featured image references will result in broken image placeholders on the front end.

Permissions

Uploading media requires the media.upload permission. This is granted to Admin and Editor roles by default. Authors and Subscribers cannot upload files.