Giter VIP home page Giter VIP logo

laravel-thumbnail's People

Contributors

rolandstarke avatar

Stargazers

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

Watchers

 avatar  avatar

laravel-thumbnail's Issues

Delete single thumbnail

How should i delete single thumbnail ? if the src picture updates the old thumbnail is cached.

Images not viewable for chmod permissions

Since I upgraded to Laravel 9 and PHP 8.1.5, I've noticed that it correctly creates thumbnails but they are not showing.

In checking the routes I noticed that:

/httpdocs/storage/crops/news/1z/yz
yz = 0700

towrmhfoogoog48ow4osc.jpg
0644
if I put permissions 0755 on folders and files the images will be viewable...

Relative URL

How can I configure the package to generate relative urls?

Folder no exist

{{ Thumbnail::src(public_path($photo->path))->smartcrop(200, 200)->url() }} - return path. But folder "thumbnails" not created

Port for path

I use a port for my website, so how can I configure that in thumbnail?

FR: Support FILESYSTEM_CLOUD as an alternate to $disk

I am using FILESYSTEM_CLOUD in .env to decouple the cloud disk driver from my application.

For example, instead of Storage::disk('spaces') I can do this: Storage::cloud() which allows me to easily swap out the disk by changing one line in the .env file.

Currently to achieve this with laravel-thumbnail I am doing this:

    'allowedSources' => [
        'cloud' => ['disk' => env('FILESYSTEM_CLOUD', 'local'), 'path' => '/'],
    ],

    'presets' => [
        'cloud' => [
            'destination' => ['disk' => env('FILESYSTEM_CLOUD', 'local'), 'path' => '/thumbnails/default/'],
            'smartcrop' => '256x256',
        ],
    ],

And using it like this:

$data = Thumbnail::preset('cloud')->src($path, config('filesystems.cloud'))->string(true);

Would be awesome if I could do something like this instead:

    'allowedSources' => [
        'cloud' => ['cloud' => true, 'path' => '/'],
    ],

    'presets' => [
        'cloud' => [
            'destination' => ['cloud' => true, 'path' => '/thumbnails/default/'],
            'smartcrop' => '256x256',
        ],
    ],
$data = Thumbnail::preset('cloud')->cloud()->src($path)->string(true);

CDN Storage Thumbnail Creation Error

I found this packages by accident, and I already like it so much but I have a question. I have the original images in a DigitalOcean Spaces CDN called in Laravel's filesystem “do_spaces”.

So the image for example is:

\Thumbnail::src('projectx/article/00b9c8c0e4123c441353050cceafb173.jpg', 'do_spaces' );

How can I make him save me image in:

projectx/crops/.*

in config:

        'ld' => ['disk' => 'do_spaces', 'path' => 'projectx/'], //allow images to be loaded from `Storage::disk('local')`
        'pd' => ['disk' => 'do_spaces', 'path' => 'projectx/'],
            'destination' => ['disk' => 'do_spaces', 'path' => 'projectx/crops/'],

Blade:
{{ Thumbnail::src('projectx/article/00b9c8c0e4123c441353050cceafb173.jpg', 'do_spaces')->url() }}

but when the url is generated in the blade:

https://***.ams3.digitaloceanspaces.com/projectx/crops/db9/ag5cy0kooo40w4g4go0so8.jpg%3Fp%3Darticle%252F00b9c8c0e4123c441353050cceafb173.jpg%26s%3Dld

and the image does not exist, where am I wrong?

Source is not allowed. Given path

Source is not allowed. Given path error given when trying to generate thumbnail.

src="{{\Thumbnail::src(storage_path('public/'.$pnews->primary_img)) }}"

Update to php 8

Please can you update your composer.json to allow php 8:

"require": {
        "php": "^7.1.3|^8.0",
        "intervention/image": "^2.0"
    },

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.