Download the PHP package flownative/neos-pixxio without Composer

On this page you can find all versions of the php package flownative/neos-pixxio. 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 neos-pixxio

MIT license Packagist Maintenance level: Acquaintance

pixx.io adaptor for Neos

This Flow package allows you to use assets (ie. pictures and other documents) stored in pixx.io in your Neos website as if these assets were native Neos assets.

About pixx.io

pixx.io offers an intelligent solution for digital asset management. The software makes working with pictures, graphics and video files easier. pixx.io is safe, efficient and easy to understand and handle.

Key Features

Installation

The pixx.io connector is installed as a regular Flow package via Composer. For your existing project, simply include flownative/neos-pixxio into the dependencies of your Flow or Neos distribution:

After installation you need to run database migrations:

Enabling pixx.io API access

The API access is configured by three components:

  1. a setting which contains the customer-specific service endpoint URL
  2. a setting providing the pixx.io API key
  3. a setting providing the pixx.io user refresh token

To get the needed values for API endpoint and API key, please contact your pixx.io support contact.

First define the customer-specific service endpoint by adding the URL to your settings:

You will likely just replace "flownative" by our own subdomain.

Next, add the pixx.io API key and the refresh token of the pixx.io user you want to connect with Neos:

When you committed and deployed these changes, you can log in to the Neos backend and navigate to the pixx.io backend module to verify your settings.

If you would like a separate pixx.io user for the logged in Neos user, you can copy and paste your own "refresh token" into the form found in the backend module and store it along with your Neos user.

When everything works out fine, Neos will report that the connection was successful (and if not, you'll see an error message with further details).

Additional configuration options

During import, Neos tries to use a medium-sized version of the original instead of the high resolution file uploaded to pixx.io. This greatly improves import speed and produces good results in most cases. Furthermore, this way some formats, like Adobe Photoshop, can be used seamlessly in Neos without the need to prior converting them into a web-compatible image format.

It is possible though, to configure this plugin to always use the high-res original for import. By default, formats like SVG or PDF are imported this way. You can add more types through the similar entries like in the following settings:

Sometimes the API Client needs additional configuration for the tls connection like custom timeouts or certificates. See: http://docs.guzzlephp.org/en/6.5/request-options.html

Using ImageOptions parameters for files

Via configuration, you can set what dimensions the returned images must have. The sizes are defined by the following keys:

The configuration is by default

Each imageOptions can be overridden from your own packages configuration, by addressing the specific preset key.

By default, the assets from Pixx.io is returned in a cropped format. When this is the case, a editor can't see if a asset is horizontal or vertical, when looking in the Media Browser list. By setting crop: false the image will be returned in a not-cropped version, and it's visible for the editor, to see the assets orientation

Cleaning up unused assets

Whenever a pixx.io asset is used in Neos, the media file will be copied automatically to the internal Neos asset storage. As long as this media is used somewhere on the website, Neos will flag this asset as being in use. When an asset is not used anymore, the binary data and the corresponding metadata can be removed from the internal storage. While this does not happen automatically, it can be easily automated by a recurring task, such as a cron-job.

In order to clean up unused assets, simply run the following command as often as you like:

If you'd rather like to invoke this command through a cron-job, you can add two additional flags which make this command non-interactive:

Auto-Tagging

This plugin also offers an auto-tagging feature. When auto-tagging is enabled, Neos will automatically flag assets which are currently used with a user-defined keyword. When as the asset is not used in Neos anymore, this keyword is removed. This keyword is applied to the actual file / asset in the pixx.io media library and helps editors to keep an overview of which assets are currently used by Neos.

Auto-tagging is configured as follows:

Since Neos currently cannot handle auto-tagging reliably during runtime, the job must be done through a command line command. Simply run the following command for tagging new assets and removing tags from assets which are not in use anymore:

It is recommended to run this command through a cron-job, ideally in combination with the media:removeunused command. It's important to run the removeunused-command after the tagging command, because otherwise removed images will not be untagged in the pixx.io media library.


NOTE
At this point, the auto-tagging feature is not really optimized for performance. The command merely iterates over all assets which were imported from pixx.io and checks if tags need to be updated.

Category mapping from pixx.io to Neos

pixx.io offers categories to organize assets in a folder-like structure. Those can be mapped to asset collections and tags in Neos, to make them visible for the users.


NOTE
The pixx.io asset source declares itself read-only. Neos does not show asset collections in the UI for read-only asset sources. This has been changed for Neos 7.3.0 and up with https://github.com/neos/neos-development-collection/pull/3481

If you want to use this feature with older Neos versions, you can use the PR with cweagans/composer-patches or copy the adjusted template into your project and use Views.yaml to activate it.

The configuration for the category import looks like this:

Afterwards, run the following command to update the asset collections, ideally in a cronjob to keep things up-to-date:

To check what a given category would import, you can use a verbose dry-run:

The above would have added "Kunde A/Projekt 2", the items marked "=" exist already, and everything else is ignored.

Background and Demo

Background and Demo

Credits and license

The first version of this plugin was sponsored by pixx.io and its initial version was developed by Robert Lemke of Flownative.

See LICENSE for license details.


All versions of neos-pixxio with dependencies

PHP Build Version
Package Version
Requires neos/flow Version ^6.3 || ^7.0 || ^8.0 || dev-master
neos/media Version ^5.3 || ^7.0 || ^8.0 || dev-master
guzzlehttp/guzzle Version ^6.0 || ^7.0
behat/transliterator 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 flownative/neos-pixxio contains the following files

Loading the files please wait ....