Git Product home page Git Product logo

pyro-image-crop-field-type's Introduction

Pyro-Image-Crop-Field-Type

Image cropping functionality for any PyroStreams based PyroCMS modules.
Simple and easy to use image cropping tool for PyroCMS v2.2 Page, Blog and other 3rd party streams based modules.

Screenshot:

Crop your images!

Features:

v.1.0.1

  • Multiple instance fix
  • Delete button css fix
  • Scale functionality

v.1.0.0

  • Interactive image cropping based on Jcrop
  • Compatible with all PyroCMS v2.1+ PyroStreams based core & third party modules
  • Easy-to-use tags: {{my_image.img}} // generates the cropped image (img html tag)
  • Re-crop your photos anytime when editing your streams data (re-upload not necessary)
  • Based on PyroCMS Core Files module and cache
  • Delete / re-upload functionality
  • Languages: English (en), Hungarian (hu)

Install:

  1. Copy the modules/files folder to the shared addon modules path (/addons/shared_addons/modules).
  2. Copy the field_types/imagecrop to the shared addon field_types path (/addons/shared_addons/modules/field_types)
  3. Go to Control Panel / Add-ons / Modules and install the "Files - cropping" module
  4. Enjoy!

Tags in templates

{{my_image.thumb.image}} - cropped image url {{my_image.thumb.img}} - cropped html img tag

Original image: {{my_image.img}} - the 'large' original version

Scale: Resize your cropped image (90%,80%,70%, etc..)

{{my_image.thumb.scale.<percent 1-99>.image}} - cropped, scaled image url {{my_image.thumb.scale.<percent 1-99>.img}} - cropped, html img tag

Example: Field crop width: 600, Field crop height: 400 {{my_image.thumb.scale.50.image}} - generate a cropped and then 50% scaled image: 300x200 Scale function is handly when you want to use the same cropped area in smaller sizes..

Other "core parameters" just like any other PyroCMS image file:

{{my_image.filename}} {{my_image.name}} {{my_image.alt}} {{my_image.description}} {{my_image.ext}} {{my_image.mimetype}} {{my_image.width}} {{my_image.height}} {{my_image.id}} {{my_image.filesize}} {{my_image.download_count}} {{my_image.date_added}} {{my_image.folder_id}} {{my_image.folder_name}} {{my_image.folder_slug}

License:

Apache v2 Copyright: Peter Varga http://www.vargapeter.com

pyro-image-crop-field-type's People

Contributors

peet86 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.