Bagisto CMS...
-
Hie guys. I have created a custom cms page in bagisto from the admin panel. now I want to add an image onto the page. I want to ask which path I should use or which file I should upload the images so that the image path is read from the cms image tag.
-
Hello @Daisymond,
As I am seeing that you are successfully created a cms page but you are not able to add an image onto the page. For this first, you need to place all your images in Laravel's public folder directory. Let's say you have project in a folder name i.e. Bagisto.
Now go to 'Bagisto/public' and create a folder name i.e. 'images' you can create any folder according to your need. I am going with name 'images', now place all your images in that folder.
Let's say you have 'image-1.jpg' in the images folder and you want to show that image in the CMS.
Now go to CMS -> Pages and click on the edit page on which you want to add an image.
After that scroll down to 'content' portion, here you will see that source code button in extreme right corner. You need to click on that button then source code will appear.
Here you need to add,
<img src="@php echo asset('images/1.jpg') @endphp" width="400" height="400" />
and then click on Save Page button.
Important Note: TinyMCE will not detect image but if you will see in the preview page, you will get your image.