No thumbnail shown in Laravel's File Manager - php

Currently using Laravel version 5.7.13 with Unisharp's CKEditor & File-Manager
I successfully linked the directories to show the images that I have in the file. However, the thumbnails were not shown.
Is the problem lies in my directory routing (lfm.php)?
Edit 1: Just found the solution for my problem, apparently the thumbnails were "broken" due to the link provided. Then, I changed my filebrowserImageBrowseUrl in the CKEditor's script to a raw url without the 'index.php'.
Before: ../../laravel-filemanager?type=Images
After: http : //localhost/[root-directory]/public/laravel-filemanager?type=Images
In conclusion, the 'index.php' is preventing the thumbnails from showing up.
Now it's working perfectly.

Related

Broken png image using Laravel Asset Pipeline despite 200 OK status

I'm using Codesleeve/asset pipeline on my Laravel project to serve css, js and image files. It on the whole works fine but there is an issue with displaying css-loaded images. The image does not display and shows the browser's "broken image" symbol when loading it directly (http://art.ipscap.com/assets/select2.png for example): e.g.
Upon inspecting the page it shows the image is loaded successfully with 200 OK status (or cached) but there seems to be an error displaying it. Seeing as the image in question displays fine on my local machine and the problem is only in production is there a way to diagnose this issue?
Edit: Still haven' t managed to find a solution for this. For reference the live broken image url is https://art.ipscap.com/assets/select2.png. The image itself is in app/assets/images/select2.png and the readme in the same directory states:
If you place an image here called foobar.png then you can access that image by going to http://<hostname>/assets/foobar.png
I find it strange as the image does not fail to load but is being broken by asset pipeline. The same does not seem to occur to other images in the app such as the header jpeg image.
Do you use different server software on your local and production server? I see the production uses nginx. In that case, you might have to add something to your config as stated here:
https://github.com/CodeSleeve/asset-pipeline#can-i-use-nginx

dompdf image not found on live server

After several hours of searching, I am still unable to resolve this issue. I am having a problem with displaying images in a PDF file generated by dompdf library.
I have an editor tinyMCE where a user can upload images, edit his page, and see a preview in PDF format with a Button press.
One important thing here: I am using 'convert_urls : true' in tinyMCE's configuration which converts the image src = "https://mysite.com/public/images/image_name.png", necessary for the PDF library to display them.
I set the required dompdf configurations:
def("DOMPDF_ENABLE_REMOTE", true);
Here I found that it will appear after changing the attached CSS with a dompdf like:
img { display:block }
All still in vain.
Note: Everything is working fine on localhost. But on the staging server, I get a message box having a cross inside it saying "image not found" and displaying the image path. When I click on that path, the image is already there on my server. I wonder why dompdf is giving me this message?
I already faced same kind of issue. solution is very simple when Dompdf does not accept url with http format. Try with full document root.
Instead of using https://example.com/public/images/image_name.png try with /var/www/mysite/public/images/image_name.png
Use a absolute path for external css and images than live path! its worked for me also

Hard-coded image not displaying in wordpress footer

I finished a project using the Finesse Wordpress theme from Ixtendo several months ago and all was well. However, recently I've noticed that an image that is hard-coded in to footer.php no longer displays, instead all I see is the alt text.
I've also tried using the image as a background image to a div which doesn't work either.
Anyone know how to fix this?
Some further info in case it's useful. I had also hard-coded references to JS files in header.php which worked for a few months but then the theme stopped getting the links. I resolved this by installing a plugin called WP Headmaster which enqueues the JS in to the theme.
Thanks in advance for any help.
This will most likely be that the image location is specified relatively.
If you copied the location from the css file, the relative location will probably not have been changed.
You can verify this by right clicking on the image in google chrome/other capable browser, and selecting "open image in new tab". There you will see the absolute URL - which is probably incorrect.
A simple answer in the end.
We have a hosting account, e.g myhosting.com. The Wordpress site is loaded in to a directory called 'abc' within the main hosting account.
There is a domain name pointing at this directory, e.g. mydomain.com. The problem came from me using myhosting.com/abc/images/logo.jpg when I should have been using mydomain.com/images/logo.jpg
I obtained the correct URL via the media manager in Wordpress.

How to browse a directory within trsteel CKEditor ?

I have successfully installed trsteel CKEditor for symfony 2, and it works fine except for image upload.
When I try to browse the server to updload an image, it returns me the html page and not the directory (the route is configure to show a webpage but I don't know how to do overwise).
I answered almost the same question before here
Shortly, you need a bundle to work with files on the server side, and provide integration with ckeditor.

two sets of same php code with same version working differently on two different servers?

I made a class that converts a string of text into a png image and uploads on the server:
http://testing.mehhh.org/php/png.php (you can view php source on the page)
http://testing.mehhh.org/php/phg.php <-- shows php version
this one works great.
now I am trying to get this to work on a clients server
http://autoxplorer.com/~tameem/png.php This doesn't work!
http://autoxplorer.com/~tameem/php.php <-- also using same php version
what gives? I thought it's a permission thing.. but the png folder has full access.. and I tried a super simple uploading script and it runs and saves files to that folder. What is going on here?
You have just put online some PHP scripts that link to images. The link to the images actually is different.
http://testing.mehhh.org/php/png/4de9441d68cf8_1307132957.png
http://autoxplorer.com/~tameem/png/4de9424d41208_1307132493.png
While the first link returns actually an image, the second image link gives a 404 error. Looks like you have not configured your server properly to actually execute the PHP in the second case to return an image.

Categories