I have a download.php file to display images on a web page as well as downloading files like pdfs, docs, etc.
in ckeditor if the src for the image is /download.php it dispalys like there is no image or broken link image, if the src for the image is http://www.mydomain.com/download.php my image displays just fine in ckeditor.
Any thoughts? And no i cant just make it put the full domain. There is a reason to long, complicated, and stupid to explain thanks to the web hosting company.
In the configuration you need to set the baseHref to the full path, then it will add that to the images/files you upload and insert.
Related
I have successfully uploaded an image in folder application/uploads codeigniter. When I'm trying to display the image in an <img> tag its not showing. I've checked the path is correct and the image does exist.
Just hit that image src link on browser and check whether image is displaying or not. You can upload your images in assets folder. Call your image by using url https://yoururl.com/assets/imgfolder/img.jpg . It should display. Hope this will help you.
Can you show us the tag you are using with the path. If you believe the path is correct, can you type this path straight into your browser and see the image displayed? You can do a 'view source' to get the path if you are using Codeigniter base_url or similar.
(sorry to post this as an answer but my rep isn't high enough to allow commenting)
I'm using uploadcare.com to store my images and files. I just started using it now. I was just wondering that how can i display the uploaded files in a web page. I looked through the documentation too. But didn't get anything to start with?
Is there anyone who have used it?
As per documentation, all images are available via CDN URL (this URL is returned by widget, it's up to you to save it). To add an image to your page just add an img tag:
<img src="http://www.ucarecdn.com/5651bbb6-c599-44bd-9c63-1db5e67db6ad/" />
I am using the TimThumb script (http://code.google.com/p/timthumb/). My images links are generated like this: http://website.com/pics/nature/animals/bear.png and this works great but I can't seem to use TimThumb like this: http://website.com/resize.php?src=http://website.com/pics/nature/animals/bear.png&h=150&w=150, it says Could not find the internal image you specified. I believe this is because my images are brought from a folder by slug names (bear.png). The folder's images are named by the ID of the image so there is no bear.png on the server, my application is using slugs to search the DB and bring up the real name of the picture but it loads the image upon this link: http://website.com/pics/nature/animals/bear.png. If I give my resize.php script a link from flickr it works great.
BTW, resize.php is the actual TimThumb script.
Any ideas ? Thanks !
Dont use a local path, enter the full URL for timthumb just like you did with flickr
I have a mini gallery I created and what I did was just used FTP, no database so when I upload a photo it is named "image1.jpg" and then if I upload another image it is named "image2.jpg" and so on. Well, if I delete image1, then image2 is automatically renamed to image1.jpg and all of them get re-named if there are more.
The problem is that now the new image1 is showing the old image unless I clear my cache. I found a mini solution to work around this:
$rand = rand(100,1000);
<img src="images/image1.jpg?<?=$rand;?>">
That works fine but I found that it does not work with facebox, whenever I try to view the full-size image in Facebox, it can't read the URL with the random number and it just brings up a ton of characters that usually crashes my browser.
Is there a better way to fix this?
You can put no cache headers on the image directory.
Hi I want to put an image into the PDF file I'm making using TCPDF. It is an image generated by an online API so I cannot store it on my webhost. But when I put the image URL for creating I'm getting error while generating the PDF file.
TCPDF can only use images saved on your webhost - local files, as it needs a physical path to the image in order to include it in the document. The only way you could grab an image from HTTP to be used for TCPDF would be to use cURL, which is something I have only used for text and html, but have no experience grabbing images with, but I'm sure there's a way it can be done.