Download the PHP package jmoguelruiz/yii2-resource-image without Composer

On this page you can find all versions of the php package jmoguelruiz/yii2-resource-image. 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 yii2-resource-image

Welcome to the yii2-resource-image wiki!

This is a component for yii2, to manage the images to upload in server and the generation of paths easiest.

Override

I think that the url path is formed for five parts: root, base, resource, size, name. For example:

And all togueter is http://project-template.dev/images/dev/player/thumb/image_1485386176.jpg

For that reason, I built this component to configure each part and generate the url most easy, I included many functions that help you to manage the images files.

Each part has its own configuration.

Root

This part is for root of url, the follow code is the default configuration:

When isWebUrl is true, generate http://project-template.dev/ otherwise is /Users/josemoguel/Documents/fuentes/project-template/frontend/web

Basepath

This part is automatically configured from environment that you are running.

You can set the environment if you want, there are three environments by default dev,test,prod.

Resource

The resource that belongs to the image, player, user, gamer for example.

When isTemp is true, add to the resource the prefix _temp or if you have one configured player_temp, set isTemp = true for process the image, and later save in the real directory.

Size

You can have many sizes of the image to save.

Name

You can assign the name of image.

If you put concatTime = true will concat the time in the name image resolving the problem with cache. image_1485386176.jpg.

Installation

The way prefer is composer:

composer install jmoguelruiz/yii2-resource-image

Or adding in you composer file.

"jmoguelruiz/yii2-resource-image": "1.0.*"

In config/main inside of component put the follow code:

You should add the file ResourceImage in your common\components folder, overriding this extension, for configure the follow options.

Create the folders where the images will be saved and configuring your enviroments enviroment/index.php for permissions.

Usage

Generating a url.

Saving one image file.

Save image in many sizes.

Save images for sizes.

Get web url

Get default web url

ResourcePath

Generating new path you can access the data of the model.

Contributions

You can use this component if you want can contribute send email to [email protected].

From community to community...


All versions of yii2-resource-image with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version ^2.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 jmoguelruiz/yii2-resource-image contains the following files

Loading the files please wait ....