Git Product home page Git Product logo

yii2-image-thumbnail's People

Contributors

sadovojav avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

yii2-image-thumbnail's Issues

basePath

Please fix the readme that the last fix changed basePath to null

"bower-asset/holderjs": "2.8"

Problem 1
- Installation request for sadovojav/yii2-image-thumbnail dev-master -> satisfiable by sadovojav/yii2-image-thumbnail[dev-master].
- sadovojav/yii2-image-thumbnail dev-master requires bower-asset/holderjs 2.8 -> no matching package found.

Undefined index: placeholder

PHP Notice โ€“ yii\base\ErrorException

Undefined index: placeholder

1. in /app/vendor/sadovojav/yii2-image-thumbnail/Thumbnail.php at line 72

70    public function init()
71    {
72        $this->options['placeholder'] = count($this->options['placeholder'])
73            ? array_merge($this->defaultOptions['placeholder'], $this->options['placeholder'])

New functionality request

I think is not possible for example to create a thumbnail with a fix width and auto height (keeping the aspect ratio).

In many cases this I think this will be useful

Problem in install

hi. thank you for this.i am a first watcher !
but i cant install with composer! how to install manually?

not working form me

Hello, I dont know why but for me is not working.

this is my code

echo Yii::$app->thumbnail->img( Yii::getAlias('@webroot/images/products/'.$r['images']), [
                       'thumbnail' => [
                        whidth' => 280,
                        'height' => 300,
                    ],
                    'placeholder' => [
                           'width' => 280,
                        'height' => 300
                    ]
            ]);

and produce this code

... src="/thumbnails/f5/f5e022a013b424919e87b5ece81cd7bc.jpg" ....

now, I am in local, I try to create a folder name thumbnails in:

applications/MAMP/htdocs

the getAlias is correct.

I make some error?
thanks

Private methods

You can change the scope of methods from private to protected?
Thx!

PLACEHOLDER_TYPE_JS and PLACEHOLDER_TYPE_IMAGINE ignore yii base URL

It seems to me that the placeholder types PLACEHOLDER_TYPE_JS and PLACEHOLDER_TYPE_IMAGINE ignore the Yii base URL (see https://www.yiiframework.com/doc/guide/2.0/en/concept-aliases#predefined-aliases ).

That is, if your app is running at www.tld.com/path/to/app/ instead of at www.tld.com/, placeholder URLs will be generated for the root of the path:
with PLACEHOLDER_TYPE_JS: www.tld.com/holder.js?params=... (HTTP 404) instead of www.tld.com/path/to/app/assets/.../holder.js?params=...
with PLACEHOLDER_TYPE_IMAGINE : www.tld.com/thumbnails/... (HTTP 404)
instead of www.tld.com/path/to/app/thumbnails/...

I'm using these settings:

    'thumbnail' => [
        'class' => 'sadovojav\image\Thumbnail',
        'cachePath' => '@webroot/thumbnails',
        'prefixPath' => '@web',
        'options' => [
            'placeholder' => [
                'type' => sadovojav\image\Thumbnail::PLACEHOLDER_TYPE_IMAGINE
            ]
        ]
    ],

Am I missing or misunderstanding something?

Edit: I think #9 could be related.

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.