Failed to add images in Tableau using URL that has no extensions - html

I was trying to create a dashboard using new image role function. However, I was struggled to add image using urls that don't have extensions (such as jpg,png etc.) included in the url. example:
https://media.licdn.com/dms/image/C5603AQF8paxRmnuJxg/profile-displayphoto-shrink_800_800/0/1517556808961?e=2147483647&v=beta&t=NBYea9Qtpy7LNtCZ0nC80pdz6NkOXXPGLnTNFL1QY_Y
I understood this is from LinkedIn and the link might change within certain period of time but this is accessible via web browser when I was testing this.
Wondering if you guys have any ways to display this image in Tableau.
I've tried modified the url by adding '' but it's still not working. The image is also accessible by using 'Web Page' Object.

Related

How to design an app for changing CSS file for website from given URL?

I want to make an app which will be working similar to Stylish extension and google chrome inspector. Is it possible to make something like this but working not as an extension but as a separate service?
I've already done client app based on react which have menu with elements to change, for example I can choose font type, font size, colors, etc.
Beside menu, I have iframe which displays site from url - my idea was to download whole webpage on the server side, deploy it with docker on nginx to serve it and send back my new url to the client. Is there any easier way to do it?
I've also done simple backend app based on spring which downloads the whole webpage to folder.
The most important thing in this app is to generate separate CSS file which can be later included to given webpage.
I struggle with few problems:
How to display website from url, if with iframe, how to change CSS of given website?
How to display changed CSS immediately?
How you got any ideas or tips how to do it?
Maybe using javascript you can apply your changes to the layout and save it as 'actions' to perform after rendering,,,, or you could generate own css and based on that css generete functions, which perform the change to the layout ( the other way around )
To swop the stylesheet, give the link element an id so you can reference it, then reset its href, i.e.
<link rel="stylesheet" href="style/default.css" id="themeStyles" />
function setTheme(themeName) {
let stylesheetUrl = 'style/' + themeName + '.css';
document.getElementById('themeStyles').setAttribute("href", stylesheetUrl);
}
If the page hosted in the iframe is served from the same domain as the iframe then this is easily done with cross frame scripting.

Multiple kentico sites, direct url to CSS for one site is requiring a login

I have a kentico install with multiple sites, all 'should' be set up the same but having a weird issue with the 3rd site i just launched. Any sort of file (image, script, or css) won't load by its relative path, and if i try to open the url i am presented with a kentico login screen.
The truly weird part is if i put the same url path but put one of the other sites domains in front of it, the image loads fine.
newsite.com/imageURL <- wont load
othersite.com/imageURL <- loads
otheroldsite.com/imageURL <- loads
hopefully that makes sense, i've never seen anything like this before.
Start with CSS first, make sure you've enabled the css for your new site:
CSS stylesheets\YourCSSName\Sites
For the media library you must have permissions
Media libraries\YourMediaLibraryName\Security
Make sure that 'See library Content' is set for All Users
But scripts usually in ~/CMSScripts/Custom/ so any site in you case should be able to access them. If your script is there and you can't load it - it's not Kentico permission issue.

Google Drive images in img src=webContentLink?

Can I use images stored in Google Drive to be used in a website by the html,<img src="<webContentLink>" /> ?
Where <webContentLink> is returned after a file is uploaded and is in the format, 'https://drive.google.com/uc?id=<FILEID>&export=download'
I have a small website created for account users only. They can upload files to their google drive folder and this folder has permissions set to share with the accounts of the other users (specific people only). This is an ASP.NET MVC 5 website using the Google API Client Libraries for .NET.
In Chrome and Firefox the images display fine, in IE and Safari they don't show and return a 302 status code. Sometimes if you view the image directly in a new tab and then refresh the web page it shows. It might also show if the folder permission is set to 'anyone with the link', but this isn't ideal.
The documentation (https://developers.google.com/drive/v3/web/manage-downloads) says, 'If you want to allow a user to view a file directly in a web browser instead of through the API, use the webContentLink.' I understood this to be okay to use img src='' to display an image directly without the API, however it then goes on to say, 'You can either redirect a user to this URL, or offer it as a clickable link'.
So can Google please confirm if 'webContentLink' can be used in img src='', or not and why it works in some browsers and not others? I've read many posts on this, some old, some more recent. If it's not to be used in img src I think it should be made clear in the documentation.
Many thanks
Yes, you can definitely use webContentLink as your img src in your HTML page. I tried and this is what I got on my sample HTML page.
<img src = "https://drive.google.com/uc?id=0Bzgk4zncCwI7aDZCSHY4YU0zNUF&export=download">
webContentLink can be obtained using Files.list and place 'files' in the fields parameter.
Displaying an image from Google Drive can be done in 3 steps:
Retrieving your image ID
Right click on your image and select Share.
You'll see a link that you need to copy. You will extract the image's ID from the URL.
Here is what your sharing link should look like:
https://drive.google.com/open?id=YourFileId
Check your sharing settings
Your images will only be visible to people who have access to those files. To allow anyone access to your images, you need to set the sharing setting as Visible with the link.
Display your image
With your sharing settings properly configured and your image file IDs at hand, you can now specify how your images will be displayed using a prescribed format.
https://drive.google.com/thumbnail?id=YourFileID
More details can be found here
when I do this I just get a sign like an nonexistent image.
Why?
I just copy paste this line:
<img src = "https://drive.google.com/uc?id=0Bzgk4zncCwI7aDZCSHY4YU0zNUF&export=download">
JS Fiddle

Cannot create direct link to image hosted online

I was just trying to add a background image from http://wallpaperswide.com/rocky_peak-wallpapers.html to my website.
The link to the particular image is http://wallpaperswide.com/download/rocky_peak-wallpaper-1920x1080.jpg.
However, if I try to load the image from the second link, it doesn't load. If I paste the URL into my browser, it redirects me to the first link.
Why does this happen? Thanks.
Edit
I'm getting some answers that there is an HTTP redirect. I know I can download the file and use locally.
However, the problem is that I'm writing a script that dynamically takes an image from the wallpaperswide.com site and automatically getting the image that fits the person's screen resolution. I just scan the page for the links and try to use those links. I can't download every image from the site and have them locally...
Any suggestions?
Because http://wallpaperswide.com/download/rocky_peak-wallpaper-1920x1080.jpg is not an image, it's a document.
HTTP urls always point to documents, therefore the web server is able to process it and give you the appropriate result.
The website author has added a 302 redirect rule while accessing the links directly, so you can't embed that link directly. Instead, you can download and refer it.

WhatsApp HTML Sharing Link for Image

I know you can share messages with and this is working on android and ios now:
Share with whatsapp
However I'd like to share an image trough a button on my website like someone would share an image from his phone (gallery). Is this anyhow possible?
One solution that comes to mind is uploading a photo to your server via AJAX, returning the link to the uploaded photo and then sending a message with the link to your photo using the method you described in your question. This is not quite the same as sending an image directly using Whatsapp since the recipient would only receive a link, but I doubt there will ever be a way to send an image to another application from your gallery using a webpage since that would raise some serious concerns.
Roughly, the process would like this (keep in mind that this will require some testing to get right and find a solution that works well on all platforms or at least most of them):
Create an image upload on your website. Simply having <input type="file" accept="image/*"> on your page should, on most platforms, allow you to create a button which will open a dialog to select an image from your phone's gallery when clicked. You can find a full example here or use a library such as Plupload which contains many upload methods, including HTML5 which is what you need.
Create a simple server-side upload. This depends on your language and platform, but all you need to do is store the image somewhere and return a link to it in response. If you don't want to store these images on your server, you could forward it to Imgur API and upload there.
Redirect the user to the whatsapp:// link that contains the image link.
window.location = 'whatsapp://send?text='+encodeURIComponent(imageURL);
This is the point where you need to do some testing on different platforms, though. You might not be able to redirect to a whatsapp:// link this way (since it seems like a security concern), so you may need to trick it (this is a bad idea, but I'm including it for the sake of completeness; the data-action part is from this answer):
var fakeLink = document.createElement('a');
fakeLink.setAttribute('href', 'whatsapp://send?text='+encodeURIComponent(imageURL));
fakeLink.setAttribute('data-action', 'share/whatsapp/share');
fakeLink.click();
In the end, if neither of these work, your best bet is creating a link once the upload is complete for the user to "confirm" sending which actually contains the above whatsapp:// link in the href field.
There are many factors to test and some that are implementation specific so I had to keep it vague without much code - if you come across anything else when implementing this, please mention it in the comments.