SVG image not coming properly on browser in angular 4 - mysql

I am working on angular 4 along with node and MySQL. I have saved my image .SVG in blob form but when i getting it back from API it is not able to get rendered on my browser. When i inspect it is showing me <img src="unsafe : asd......."> and when i remove unsafe then it is showing me the actual image. I am stuck on this problem.
Help Needed.
<img src="data:{{asd.asd_logo_type}};base64,{{ico.ico_logo}}" alt="...">
unsafe keyword is automatically gets added image base64 string

Related

Angular static images reload

I have an odd problem with my angular application. Its logo loads properly at first with 200 status code but then after some time when the page is inactive, it repeats calling for the image and gets 304 status with no content which results in blank space replacing my app logo.
This is the HTML piece of code responsible for the logo and there's nothing special to it so my guess would be some configuration of angular
<img src="images/example_image.svg" alt="Example Logo" class="logo-image">
In the navigation component, there's nothing more that refers to this piece of the template.
I'll be glad for sharing if you have faced a similar issue or is aware of a mechanism that might be causing this behavior

HTML not finding image

I am just getting started using HTML and I seem to have fallen at the first hurdle.
I am trying to create a basic webpage containing an image that is downloaded when clicked.
So far I have:
<a href="/images/selfie_img.jpg" download>
<img src="/images/selfie_img.jpg" alt="Selfie" style="width: 300px">
</a>
I expected this to display the image I want as it seems to my eye to be formatted exactly like all the examples I have seen. However, this only displays the alternative title, not the actual image.
I have checked the image path, and used different images to try and solve the problem. I am using VS code and the software can follow the image path to find the appropriate image, but when I load the program, the image is replaced by that annoying blue question mark. Using a URL as the image path seems to work but then the image isn't downloaded when clicked, I just get the URL.
Welcome to StackOverflow, SpicedWater!
The problem you're describing is most likely caused by a wrong path. Your browser resolves the images path and can't find it. I suggest you take a look at the source code in your browser or the developer console's network tab to see what path it's trying to find this image at and which http status code the browser determined.

HTML Attachments opened in Apple device not showing some images

I am wondering if someone can help me with a problem I am encountering with iPhone/iPad. I have an email the generates a report as an HTML attachment. In that HTML attachment, there are two images. One is a static image that pulls down a logo using a normal HTML img tag.
The other is dynamic. It also uses the normal HTML img tag, however it calls out to a web api with some information identifying the user.
<img src="http://MyApiServerName.com/api/User/{id}/{OtherParm}" >
The Web API uses information on the user to return appropriate images to them. For some reason the dynamic image does not show up with the attachment is opened on an iPad/iPhone.
The image works just fine when the attachment is opened from a computer. I thought maybe something might be blocking images, however then I would expect the static image not to display as well. I verified that the "Load Remote Images" setting is turned on.
I am at a loss here. Is there something with iOS that prevents dynamically generated images from showing in HTML attachments?
Thanks
Ok, I can't explain why the above is not working, but I did find something that does. Instead of using the following URL
<img src="http://MyApiServerName.com/api/User/{id}/{OtherParm}" >
use
<img src="http://MyApiServerName.com/api/User/{id}/{OtherParm.jpg}/" >
The final param needs to end with ".jpg/". If the slash is not there, you will get a 404 error.
Then in the API method, you simply strip off the .jpg part of "OtherParm" to get the intended value for "OtherParm".

Base64 encode image in visual composer WordPress

I try to get a base64 in my img src like this: <img src="data:image/jpg;base64,etc..."/> into my WordPress website through the visual composer in text mode. It's all working fine when I save it but when I edit it again the src attribute is just gone. The image does get displayed but the code disappears when I try to edit it. When I update it without editing anything it just saves <img /> without anything in it. So no image is shown. This only happens when my src starts with the standard base64. It stays when I just throw in a URL. What is going wrong here and how do I fix this?
Edit:
I use text block element which I would like to keep this way cause Im using a json plugin.
When I inspect it, it removes the: image/jpg part.
Use Visual Composer backend editor and add the img src code through 'Raw HTML' element.
I tried replicating your issues using this encoded image code
https://jsfiddle.net/casiano/xadvz/
<img src="data:image/gif;base64"/>
but I never faced that issue.

External Image not shown because of parameters in URL

I'm struggling with SSRS to get external Images shown on my report.
Situation/Environment
SSRS 12
Images are hosted on Akamai (Caching Server)
Problem
If I call the image by http://server/folder/image.jpg I see the image in Report Builder Design View, Preview and online on the server. HTML on the server:
<img onload="this.fitproportional=true;this.pv=0;this.ph=0;" height="155" src="/Reports/Reserved.ReportViewerWebControl.axd?
ReportSession=0vesr555hdhfqebcbzbyf4el&Culture=1031&CultureOverrides=False&UICulture=7&UICultureOverrides=False&ReportStack=1&
ControlID=db6faa0405f142afa197478522ab25ae&OpType=ReportImage&IterationId=822ad1f6603e4ed5a7669b1863d74b1f&
StreamID=73e6746a0121466fa7e9c958c3dfb384" width="96">
If I call the image by http://server/folder/image.jpg?downsize=100:* I see the image in Report Builder Design View but not in Preview and not online on the server. HTML:
<img onload="this.fitproportional=true;this.pv=0;this.ph=0;" height="155px" src="">
Testing
That behavior can be tested with these examples:
Working: http://tech.akamai.com/image-manager/img/mountain.jpeg
Not working: http://tech.akamai.com/image-manager/img/mountain.jpeg?downsize=640:*
I have to use the downsize parameter (and others) as the images are stored in full resolution and the report gets really big if they're not resized. The list of images is dynamically loaded by a SQL-Dataset and there are tons of images so I can't resize and save them somewhere else...
I tried many URL/parameter constellation and my conclusion is: SSRS can't/won't handle the = (equal sign) in the image path.
All other characters seems to work without trouble only the equal sign.
Did somebody had the same problem and found a solution for handling "=" in SSRS external Image URL paths?
Have you tried using the ASCII %3D rather than an equals symbol?