Modified this a bit to cater to pictures pasted from the Internet
.markdown-preview-view img {
cursor:zoom-in;}
.markdown-preview-view img:active {
cursor:zoom-out;
display:block;
z-index:100;
position:fixed;
max-height:100%;
max-width:100%;
height:100%;
width:100%;
object-fit: contain;
margin:0 auto;
text-align:center;
top: 50%;
transform: translateY(-50%);
padding:0;
left:0;
right:0;
bottom:0;
background:var(--background-primary);
}