Download the PHP package smartlabsat/sulu-image-crop-content-type without Composer

On this page you can find all versions of the php package smartlabsat/sulu-image-crop-content-type. 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 sulu-image-crop-content-type

🧩 sulu-image-crop-content-type

An open-source Sulu bundle providing a custom image crop content type with an integrated React component for intuitive image cropping.

🚀 Introduction

This bundle allows you to seamlessly select, crop, and manage images within the Sulu Admin. It augments the default Sulu Media handling by introducing a specialized image_crop field type, powered by a custom React component.

⚠️ Requirements

Requirement Version
PHP ^8.2
Sulu ^2.6
Node ^20

📥 Installation

Require the bundle

Create or update your frontend build

If you haven't created an admin folder yet:

Download Sulu's Admin build

Link the local JS bundle from the vendor folder

Import the bundle in /assets/admin/app.js

Build

Build your admin assets

🎨 Usage

Once everything is installed, you can use the image_crop type in your Sulu templates or pages:

Note: The previewCrop parameter controls the thumbnail size that appears in the admin interface (e.g., 300x). Example Template Configuration

config/templates/pages/imagecroppage.xml

templates/pages/image_crop_page.html.twig

If you haven’t defined any image crops in your project yet, please refer to Sulu Docs on Image Formats.

⚛️ React Component Overview

Below is a simplified overview of the React component that powers the cropping interface: • ImageCropContentType class • Utilizes Sulu’s SingleSelectionStore to manage the selected media • Integrates Sulu’s CropOverlay for the cropping functionality • Offers convenient Select, Crop, Edit, Refresh, and Remove actions • Automatically handles reloading the image to ensure the newest cropped version is displayed

❓ Troubleshooting

Error: There is no field with key “image_crop” registered… If you see this error in the Sulu Admin, it usually means your Admin frontend build wasn’t run correctly. Please re-check the steps:

  1. Execute npm install (and the npm install file:../../vendor/...) in the assets/admin folder.
  2. Make sure you import 'sulu-smartlabsat-image-crop-bundle' in your app.js.
  3. Finally, run npm run build.

📄 License

Licensed under the MIT license. Feel free to use, modify, and distribute this software according to the terms of the license.

Happy Cropping! ✂️

If you have any questions, feel free to open an issue or pull request!


All versions of sulu-image-crop-content-type with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
sulu/sulu Version ^2.6
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 smartlabsat/sulu-image-crop-content-type contains the following files

Loading the files please wait ....