It would be wonderful if I am wrong, but I don't think you can get the image
dimensions via JavaScript. But you don't need to...
a.preview {
max-width: 200px;
max-height: 200px;
}
This will force the image to fit within a 200px by 200px window without
altering the image aspect ratio.
On M
I'm using Preview.js to create image previews on hover. The script as
it is now displays the full size image on hover, but that is often too
big. I have been able to reduce the preview size by defining
width='200px' which works fine in many cases, but when the image is
tall and narrow a 200px wid
2 matches
Mail list logo