Images embedded in HTML text not loading on Dropbox - html

I can't see the embedded images upon opening an HTML file from Dropbox, however when the folder was on the local system, the images did load properly.
Here's the HTML text that I wrote:
<img src="files/image1.png">
The HTML page shows the following sign in place of rendering the image:
Any help will be much appreciated.

you have to make sure files in the dropbox are public, not private. if it is public, then, go to the picture in the dropbox, and right-click it. click to "copy image address". and paste it to the .
hopefully, this will help

One workaround that worked for me was to sync the Dropbox folder locally. I could thus view the same HTML page in order (without making any changes).

Related

Hml file stored in OnedDrive with links to images stored in same folder not working

I'm storing html files to a OneDrive folder.
The repro is trivial.
In your onedrive, create a folder named repro.
Upload one image, for example image.jpg.
In this folder, create an html page and try to dislay the image.
Link is broken.
My page contains these 2 kind of links.
This link is not clickable (but I right click, open in new tab, it works)
<img width="100%" src="/personal/user_test_domain_com/Documents/repro/image.jpg">
This image gets broken. But if I right click, open image in new tab, it works.
Click link to open the image
It looks like Onedrive has a kind of protection that prevents displaying the images stored in onedrive. I tried to store the image in Style Assets folder as well and it didn't work.
We are developping a product where an archive of a discussion is stored as an html file in the personal onedrive of the user.
It is important that the images be displayed correctly.
What syntax should we use? Is there a way to use and iframe, an embedded component to display the images correctly in the page.
Images and html files are stored in the same location in the onedrive of the user.

Where can I host an image for use in my web page?

I am making a HTML email. I want my png image to be formatted in a hyper link like:
<img src="https://www.w3schools.com/images/w3schools_green.jpg">
Where can I upload my png image to get a link like above that ends in .png?
I know I can upload my png to files and grab it in files using HTML but I want everything to just be in one file.
Imgur is free and reliable. Alternatively, just put the image next to your html file and then set the url to just the name of the image
<img src="w3schools_green.jpg">
Have you tried using google drive? You can upload your images there and then use its link in the HTML. Here is an explanation of how to do it How do I display images from Google Drive on a website?
There are so many image hosting services available, just google "free image hosting" and you will get tons of websites. For PNG specific image hosting you can try: https://www.pngtank.com/en/user-request-png
However, choose your image hosting service wisely because if any of the website deletes your image, it will stop appearing on your website. You can also try storing images locally if this is an option for you.

Web page not save correctly in google chrome browser

When I try to save a web page using the format "Web Page, Complete," half of the time it only saves the the folder containing the style sheet and images, and the .html file is not saved anywhere on my hard drive. How do I correct this? I have noticed it also happens when I use Safari, so it is not just an isolated issue with Google Chrome.
First save the whole page (webpage,complete) which may only save the folder containing the style sheets and images, again press CTRL+S to save the page but this time select to save only the HTML page by clicking on- (webpage,HTML only).
When directory is saved but not the file, try the following:
In "File name:" include the .html extension (example:
SampleFileName.html), and
Select Webpage, Complete in "Save as Type:"
Seems to fix the bug.

Create a Sharepoint page from HTML file with images

I'm trying to create an editable page in Sharepoint. I already have the page in HTML (it's quite large) and it has many images in it. Previously I have just created a new page in sharepoint and pasted the HTML source in, the uploaded/inserted the images manually, one at a time.
Unfortunately, I am not able to do this in a reasonable amount of time since there are many images this HTML file is using.
So, I want an editable Sharepoint page that keeps the images intact from a directory that looks like this:
thepage.html
1.png
2.png
...
...
...
343.png
etc
Any ideas?
EDIT: For more clarity - this is a specifications document in HTML form, so it has a lot of text and header integrated with images. I'd like it to be converted to an actual Sharepoint Page that is editable from Sharepoint's interface.
Seems best here to use a low-tech solution, some HTML editing and use the best way for you to upload multiple files.
Assuming
C:\mypage
-> \page.html
-> \images\1.png
-> \images\2.png
...
-> \images\100.png
Via the UI
Go to a Document or Image library, and use the "Upload Multiple files/images" (this only appears on Internet Explorer)
Lets say you uploaded it to //sharepoint/myimages
Create a new content page (say an Article page, or WebPart Page with a Content Editor WebPart)
Lets say your page resides now at //sharepoint/pages/mypage.aspx
Change your html to point from <img src="images/1.png" /> to <img src="../myimages/1.png" />
Edit the HTML for your newly created page (Ribbon > Edit HTML Source), paste your HTML code
Via SharePoint Designer
Drag and Drop all the images in your desired location
repeat the HTML steps above
To replace text in bulk, SharePoint Designer, your favorite HTML editor or event Notepad can do that well using the CTRL+H menu / Edit > Find & Replace options.
NOTE: the //sharepoint address up there is the http url for your site, SO won't let me use a full fake address as a sample.
From IE or from Word, save the page as a complete webpage so it creates an HTML file plus a folder with the images.
In network places, create web folder (WebDAV) pointing to Sharepoint. This way, you can access it from the file system in Explorer.
Open your new network place, navigate to the library where you want your HTML file to be, and drag-n-drop the file and folder into there.
The file then will be visible in browser, with the pictures, but the folder will be hidden.
If I have understood correctly your question. You can use this post answer to load list of images by javascript and php ->
Load list of image from folder.
Upload files to Share Point server and use that folder.
Or you can dynamically write c# code to read Share Point folder and display images.

How to make download PDF html code download on computer

I'm creating a button which will download an original file in a PDF format. I already have a zoom button if they want to read the PDF via the browser. But I want to offer the possibility to the user to download the file if he prefers, obviously the downloadable file will have a higher quality.
I've tried some basic coding but the problem is that the PDF is opened in the browser. I'm not using any CMS and won't in a future, so the photos are uploaded simply via html code and by placing the picture in the correct file, so no database is present. This is the code I'm using in this moment:
<img class="icons_infobox" src="./_img/prensa/icon_download.png" alt="Download original file" />
This website needs to be cross-browser compatible so I also will ask the answer to be browser friendly.
Thank you very much!
Hello curious people!!!
After gathering and investigating what could be done I've found some answer. I will give as an answer only two options:
100% sure it downloads but not so nice for the user
-Only sure way is converting the downloadable files into .zip. Yes its not too handy/elegant but that is for sure the way the browser will be obliged to download this file. ZIP format files are always downloaded.
Depends of the users browser preferences
-Yes, you cannot be completely sure but its a very close approach. You will need to create a .htaccess file in the folder where you have your PDF for download. You would need to create this file and place it in with the following code:
SetEnvIf Request_URI "\.pdf$" requested_pdf=pdf
Header add Content-Disposition "attachment" env=requested_pdf
I hope this helps somebody. In my web it did work perfectly. It divers between browsers but it works... You just need to know that there will be a porcentage that will see it displayed in the browser and not downloaded.
Greeeeetings,
Dani