Which PNG Fix will work in this condition? - css

I'm working with client's CMS and it's adding images like this and i can't change this.
I tried IE7.js but it's not working
<img src="~/imagefolder/CF88B05B445A4D008806C8B3E2830679.png?w=400&h=300&as=1" />

Unless whatever code runs behind imagefolder dislikes additional, unknown arguments, you might be able to trick the IE hack into thinking it's a .png:
<img src="~/imagefolder/CF88B05B445A4D008806C8B3E2830679.png?w=400&h=300&as=1&dummy=.png" />

Related

How do you reduce this image size?

I'm currently using DYI app builder platform and they have a <>source code page. So I put in
<img src="URL.png"/>
And it worked! But when I tried to shrink the image (original image is width=256 height 256)
<img src="URL.png" Width="100" Height="100"/>
Nothing happens to the size of the image.
So I tried
<div style="width:100px;height:100px;overflow:hidden;" >
<img src="URL.png" width="100px" height="auto">
</div>
Which I picked up on StackOverflow.. But it doesn't work.
Please help. BTW I have no knowledge of coding so please do not skip a step assuming I would know it.
(When I apply the code and go back to the source code page width and height disappeared from the source code page except the bare bone Img src="URL")
Something in your program is overriding it or disabling it (filtering it away). If it is another css rule that is overriding your css, then you could try:
width:100px !important;height:100px !important;
if this doesn't work then apparently the css gets filtered out, you might check the program's settings if this behavior can be changed
Try to save the page, in the DYI app builder you're using.

How can I use svg graphics in a responsive wordpress page and get them to behave the same way the bitmaps do?

I've been doing a little hacking with wordpress ..via the editor.
I'm placing svg images and I've installed the SVG Support plugin
https://wordpress.org/plugins/svg-support/
When I insert a regular image (a png file) the code looks like this:
<img class="alignnone wp-image-146 size-medium"
src="mydomain/2-300x246.png" alt="2" width="300" height="246" />
and then the theme I'm using scales it as the browser scales up and down, which is what I desire with the svg image.
When I insert an SVG file, it does not show up until I modify the code by taking out the first class tag and add a new class tag:
class="style-svg"
like this..
<img class="style-svg"
src="mydomain/convo_and_notes2.svg" alt="convo_and_notes" width="1" height="1" />
Maybe I need to use a different wordpress theme or modify the one I'm using.. but first I want to know is it possible to get the same responsive behavior from an SVG file (I'm guessing it is ...but how?)
The wordpress theme I'm using is Flat by YoArts if that's helpful information.
Sorry if this is not the right way to phrase this question.. I'm not sure what I'm doing so it's hard to know what to ask.
In a nutshell, I want the SVG files to behave like the bitmaps and would love some advice on how to do that.
The wordpress uploader adds
height="1" wudth="1"
remove that and add
width="300px"
or something like that.
also to keep the responsive behavior don't remove the
class=""alignnone wp-image-146 size-medium"
that's it. The height and width were causing the problem.

Batmanjs image upload

I'm using BatmanJs and Rails. I used carrierwave for uploading pictures and all worked fine. But, I am unable to show the image. The model has the attr photo.url which works fine. But I don't know how to bind a image tag.
I tried the following, with no result:
<img data-src="post.photo.url" />
<img data-bind="post.photo.url" />
But if I use
<span data-src="post.photo.url"></span>
it shows the url perfectly.
Kindly suggest how do i get it to work for img tag.
Very close! try data-bind-src. Actually, you can use data-bind-#{anything} to bind html attributes to keypaths.

Does <img src=""> hurt performance?

I just wanted to know if <img src=""> hurts performance in asp.net? If yes, then how, and what is a better solution?
EDIT
I would like to add some more details:-If developer miss the src tag or if the image is missing from the server(for example a.jpg is missing from the server)
<img src="Images/a.jpg">
EDIT
I asked this question because recently I faced a problem in which our Page do double postaback just because of fav.ico was missing from the server.
Yes, as you need another request to get the image. ;-)
IE6 won't respect content expiration headers when <img> is inside iframe.
It may be better to use a background image (CSS) with a sprite.

Should img[align=right] work?

I have thousands of articles with inline images like this:
<img src='...' align='left'/>
and
<img src='...' align='right'/>
I would like to add padding using CSS as follows, but it doesn't work:
img[align=left] {padding-right:10px}
img[align=right] {padding-left:10px}
This seems not supported?
This works for me (with or without quoting the value) on Win7/Chrome/8 and Win7/FF/3.6: http://jsfiddle.net/gLe3U/
You'll need to provide more details on the OS/browser/version giving you trouble, and perhaps provide a full test case (e.g. through http://jsfiddle.net)

Resources