> For the complete documentation index, see [llms.txt](https://edentech.gitbook.io/meetup/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edentech.gitbook.io/meetup/faqs/backend-image-not-working.md).

# Backend Image not working

## Backend Images not showing? <a href="#backend-images-not-showing" id="backend-images-not-showing"></a>

Please check that you have set the **APP\_URL** in the **.env** to your domain url. Run the command in your terminal in the backend

```
php artisan storage:link
```

#### **Image still not loading** <a href="#image-still-not-loading" id="image-still-not-loading"></a>

Image still not loading, then run this command

```
ln -s /DIR_TO_PROJECT_FOLDER/storage/app/public /DIR_TO_PROJECT_FOLDER/public/storage
```

Replace **DIR\_TO\_PROJECT\_FOLDER** with path to the project folder on your server

In some case you might have to run the command like below:

```
ln -s /storage/app/public /public/storage
```

### Note:  <a href="#note" id="note"></a>

If after running any of the commands above got an error about **file exists.** Then run the command below first, then run the linking command again:

```
rm -R public/storage
```

## Cloudflare / Ohter DNS / Load balancers <a href="#cloudflare-ohter-dns-load-balancers" id="cloudflare-ohter-dns-load-balancers"></a>

{% hint style="info" %}
Note: If you are using proxies/external DNS for your domain. For example, if you're behind **Cloudflare** or some kind of load balancer this also applies.
{% endhint %}

You might be getting error in the cloud or the upload just continute to load indefinately, this is because the traffic is proxied. You can set the trusted proxy in the **`TrustProxies`** middleware as per the Laravel docs.

The simplest way is to trust all proxies if you don't know them. Find the middleware`TrustProxies`and edit the file.&#x20;

Path: **app/Http/Middleware/TrustProxies.php**

Modify the line with the $proxies variable as shown below:

```
protected $proxies = '*';
```

### Livewire asset publishing <a href="#livewire-asset-publishing" id="livewire-asset-publishing"></a>

If after that the upload is still not working, then you might need to run the command below in your cpanel terminal. Open terminal and change terminal path to the root directory of your backend.

For example, if your backend is in the path as follow: **/home/edentech/public\_html/admin.** Then run the **`cd /home/edentech/public_html/admin`** in terminal on your server panel(aapanel/cpanel etc.)

Then run this command to publish livewire assests.

```
php artisan livewire:publish --assets
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://edentech.gitbook.io/meetup/faqs/backend-image-not-working.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
