Download the PHP package wizballesy/librenms-device-photo without Composer

On this page you can find all versions of the php package wizballesy/librenms-device-photo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package librenms-device-photo

LibreNMS Device Photos

LibreNMS Device Photos is a LibreNMS plugin for adding, viewing and managing photos for devices.

It is useful for documenting switches, firewalls, routers, servers, racks, patch panels, installation details and other physical device-related information directly inside LibreNMS.

The plugin adds:


Status

This plugin is currently in alpha.

It is under active development and may contain bugs, incomplete documentation or breaking changes. Test thoroughly before using it in production.


Screenshots


Features


Owned and linked photos

A photo is always owned by one LibreNMS device.

An owned photo is stored with the owner device ID in the filename, for example:

device-108-1.jpg

A linked photo is not copied. Instead, another device can show a reference to the owner device photo.

Example:

Device 109 owns:
device-109-2.jpg

Device 108 can link to that photo and show it as:
linked:109:device-109-2.jpg

This makes it possible to reuse the same physical photo across related devices, racks, stacks, modules or shared installation views without storing duplicate image files.

Deleting an owned photo removes the original photo and cleans up links that pointed to it. Removing a link only removes the reference from the target device; it does not delete the original photo.


Requirements

Optional, but recommended:


Installation

This plugin is installed as a Composer package.

Manual copy-based installation is no longer the recommended installation method.

Install from Packagist

Recommended installation method:

This uses LibreNMS' plugin package installer and installs the package from Packagist.

After installation, open:

Testing

For alpha release testing, see the alpha release test checklist.

Development install from GitHub

For development testing before a tagged release, you can install directly from the GitHub repository:

For normal users, prefer the tagged Packagist install above.

LibreNMS validate note

Installing LibreNMS plugin packages modifies:

LibreNMS validate may warn that these files are locally modified after installing third-party plugin packages. This is expected because the plugin is installed as a Composer dependency inside the LibreNMS application directory.

Do not run ./scripts/github-remove unless you intentionally want to remove local Composer changes.


Storage directories

The plugin stores photos and metadata under LibreNMS storage/app.

Default paths:

storage/app/device-photos                 Uploaded photos
storage/app/device-photos/thumbs          Active thumbnails
storage/app/device-photos-deleted         Deleted photos
storage/app/device-photos-deleted/thumbs  Deleted thumbnails
storage/app/device-photos-order           Per-device photo order JSON
storage/app/device-photos-links           Linked-photo JSON

These directories are normally created automatically.

Photos are stored outside the public webroot and are served through authenticated LibreNMS plugin endpoints.

If you need to repair permissions, many LibreNMS installs use librenms:librenms:

cd /opt/librenms

mkdir -p \
  storage/app/device-photos/thumbs \
  storage/app/device-photos-deleted/thumbs \
  storage/app/device-photos-order \
  storage/app/device-photos-links

chown -R librenms:librenms \
  storage/app/device-photos \
  storage/app/device-photos-deleted \
  storage/app/device-photos-order \
  storage/app/device-photos-links

Backup

Before installing, upgrading or uninstalling the plugin, back up the plugin data stored under LibreNMS storage/app.

The most important paths are:

storage/app/device-photos
storage/app/device-photos-deleted
storage/app/device-photos-order
storage/app/device-photos-links

This includes uploaded photos, thumbnails, deleted photos, saved photo order and photo links.

Example backup command:

cd /opt/librenms

sudo tar -czf /root/librenms-device-photo-backup-$(date +%Y%m%d-%H%M).tar.gz \
  storage/app/device-photos \
  storage/app/device-photos-deleted \
  storage/app/device-photos-order \
  storage/app/device-photos-links

To inspect the backup:

tar -tzf /root/librenms-device-photo-backup-YYYYMMDD-HHMM.tar.gz | head

Keep this backup somewhere safe before making major changes.


Configuration

The default configuration is suitable for most installs.

Main defaults:

'photos_path' => 'app/device-photos',
'order_path' => 'app/device-photos-order',
'links_path' => 'app/device-photos-links',
'max_upload_bytes' => 10 * 1024 * 1024,
'max_pixels' => 40000000,
'allowed_extensions' => [
    'jpg',
    'jpeg',
    'png',
    'webp',
    'heic',
    'heif',
],

Link and order metadata

A photo is owned by one device, but it can be linked to other devices.

Link metadata is stored per target device:

storage/app/device-photos-links/device-<target-device-id>.json

Example:

[
  {
    "owner_device_id": 109,
    "filename": "device-109-2.png"
  }
]

Photo order is stored per device:

storage/app/device-photos-order/device-<device-id>.json

Order files may contain both owned photos and linked photo keys:

[
  "device-108-1.jpg",
  "linked:109:device-109-2.png",
  "device-108-2.jpg"
]

The plugin keeps existing order where possible, removes stale order entries, and appends new valid photos or links.

Deleted photo restore

Deleted photos are moved to:

storage/app/device-photos-deleted
storage/app/device-photos-deleted/thumbs

Deleted filenames include the original filename and a deletion timestamp:

device-108-5.deleted-20260518-174625.jpg
device-108-5.deleted-20260518-174625-2.jpg

When restoring a deleted photo, the admin selects the target LibreNMS device. The plugin does not blindly restore the photo to the old device ID from the deleted filename.

Example:

device-108-5.deleted-20260518-174625.jpg
-> device-109-3.jpg

Older alpha releases stored deleted photos under storage/app/device-photos/deleted. The maintenance panel can detect and migrate that old deleted photo storage.


Optional dependencies

On Debian/Ubuntu, the recommended optional packages are:

sudo apt install php-gd libimage-exiftool-perl imagemagick libheif1 libheif-plugin-libde265 libde265-0

Package names may vary between distributions.

PHP GD

PHP GD is used for thumbnail generation.

Check if GD is loaded:

ExifTool

ExifTool is used when writing Photo taken metadata to JPG/JPEG files.

ImageMagick HEIC/HEIF support

ImageMagick is used for HEIC/HEIF conversion.

HEIC/HEIF uploads require ImageMagick with HEIC/HEIF read support. Uploaded HEIC/HEIF photos are converted to JPG.


Internal package endpoints

The plugin page is available through LibreNMS as:

The package also uses internal authenticated endpoints:

These are used for image delivery and POST actions.


Updating

To update to a specific release:

Replace v0.1.0-alpha.30 with the version you want to install.

LibreNMS validate may warn that composer.json and composer.lock are modified after installing or updating third-party plugin packages. This is expected because the plugin is installed as a Composer dependency inside the LibreNMS application directory.


Uninstall

Disable the plugin:

Remove the package:

This does not remove stored photos or metadata.

To remove stored plugin data manually:

Be careful: this deletes uploaded photos and metadata.


Security notes


Support

If this plugin saves you time or helps your LibreNMS setup, you can optionally support the project here:

Support the project

Donations are optional and are not required to use the plugin.


License

GPL-3.0-or-later.


All versions of librenms-device-photo with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
librenms/plugin-interfaces Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wizballesy/librenms-device-photo contains the following files

Loading the files please wait ...