Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change images paths #20

Open
f-liva opened this issue Aug 2, 2019 · 3 comments
Open

Change images paths #20

f-liva opened this issue Aug 2, 2019 · 3 comments

Comments

@f-liva
Copy link
Contributor

f-liva commented Aug 2, 2019

Hi.

My images are neither in /public/img nor in /storage/images. How do I set up custom paths?

@vajms
Copy link

vajms commented Aug 21, 2019

Hey!

You should have a look at this file:

vendor\shawnsandy\img-fly\src\Classes\ImgFly.php

/**
 * Display images in storage/app
 *
 * @deprecated v0.1beta use img()
 * @param [string] $image_str
 * @return void
 */
public function imgFly($image_str)
{
    return url('imgfly/images/' . $image_str);
}

/**
 * Display images from public/img
 *
 * @param [string] $image_str
 * @param string $dir
 * @return void
 */
public function imgPublic($image_str, $dir = 'img')
{
    return $this->loadImg("public/$dir", $image_str);
}

I hope I helped you!

@f-liva
Copy link
Contributor Author

f-liva commented Aug 22, 2019

Can we make the package more versatile and allow us to determine what is the prefix to put in place instead of /public?

@zedjasper
Copy link

zedjasper commented Mar 13, 2020

I used the undocumented method Imgfly::loadImg($path, $image_str);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants