I'm passing a link to an image to a PHP file in order to return said image into a fancybox iFrame based upon the solution here
Unfortunately the width of the iframe dosn't change dependent on content size no matter what size image i pass the width of the iframe remain at around 850px but the height changes.
I even set the image style to stupid values, width: 150px height: 150px, but the iframe width remained at 850px with a thumbnail size image in the top left.
attempted to combine jfk's solution but the ifrme remand the same width.
how do i wright the iframe code so the height & width are set according to the image size?
$(document).on('click', '.Images', function(e) {
e.preventDefault();
var Href = 'GetImg.php?img=' + $(this).attr("href");
$.fancybox.open({
href: Href,
type: 'iframe',
padding: 5
});
});
Thanx Holly