Coder Social home page Coder Social logo

imagecache's People

Contributors

markcameron avatar owenvoke avatar sectorf8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

imagecache's Issues

scale image

What about scale an image without resize canvas?
For example... in Line 451 in ImageCache.php do resizeCanvas only if background is set in preset

if(isset($this->preset->background_color))
$image->resizeCanvas($this->preset->width, $this->preset->height, 'center', FALSE, $this->preset->background_color);

Lowercase namespace + doc issues

There's an issue with the facade namespace and/or the documentation, which states to add this alias

'Imagecache' => 'Devfactory\Imagecache\Facades\ImagecacheFacade'

while the actual facades filepath is lower case. You should either update the docs with

'Imagecache' => 'Devfactory\Imagecache\facades\ImagecacheFacade',

or (recommended) refactor your namespaces.

Edit
There's another info that i think is misleading in the docs, since the ::get() method accepts as the first argument the plain filename, and then the configured path is automatically prepended.

I mean that Imagecache::get('somefile.jpg', 'preset') will work fine, while
Imagecache::get('path/to/somefile.jpg', 'preset') won't.

Str facade

Hey super nice lib and simple to use.
I installed it and noticed that the path to the "Str" facade in Imagecache.php uses the "Str" alias but in my version of Laravel 5.0 that alias is not defined out of the box.

The issue is easily fixed by altering the path in Imagechache.php or just adding the alias.

HTTPS url

The url generated for images will be http:// regardless.

I think a solution might be replacing the URL::asset calls in the facade with the url() helper, that should take into account current protocol, so if the user is browsing while in https the image will be resolved as https too.

What do you think?

Returns object and not array

$image will now contain an array with the following properties:

I am using this package and it returns an stdClass and not an array.

Good package btw.

Echoing nothing

Hi, I've just chosen this plugin for my L5 project.

However, when I place the following: {!! Imagecache::get($image, '600x450')->img !!} the line stay empty when I check it into the source code. The $image is the same as full URL of any image, taken from another source. Tested also with a local image, from mine /images/, but still the same.

I've followed all the instructions, added my custom 600x450 class at imagecache.presets.php, as changed the url pointint to images/imagecache/ at imagecache.config.php.

Granted permission access 775 for imagecache.

Could you please advice ?

Feature request: customizable image path

I think that being forced to keep all assets in one single directory is very limiting.

The Imagecache::get method will search for files only in the configured directory and i think it would be a better practice to change its behaviour to allow for full path handling. For example:

  1. I ask for Imagecache::get('somefile.jpg') => behaves as of now, looking in config directory

  2. I ask for Imagecache::get('path/to/somefile.jpg') => load the file from public/path/to/somefile.jpg

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.