0

Since I have a website for Comic reading, if I use reduced image sizes, it will also reduce the text which will be difficult to read. I want to retain the image size. No problem even if it creates a scrolling window. The post width should adjust to the image.

Anything that will work? I have tried setting 0,0 values in Settings -> Media.

  • 1
    Can you please provide more info ? Like which theme/plugin etc you are using ? Paste the code responsible for spitting out the output image. – Subharanjan Dec 18 '13 at 8:51
  • myreadingmanga.info/wordpress/?p=1578 Check the link. The image is actually 1800px wide. But it is resized to post width. We are using Genesis theme – user2532458 Dec 18 '13 at 9:06
0

Paste this code in the style.css file of you current active theme. (file path: /wp-content/themes/genesis-sample/style.css )

.entry-content img.size-full {
    max-width: none !important;
}
  • Thanks Subha, I already tried that, but can I extend the post width along with that? It will be good. – user2532458 Dec 18 '13 at 12:22
0

Inside your loop instead of

   <?php the_post_thumbnail( $size, $attr ); ?>

you can get your original sized images as below:

while(have_posts()):the_post();
$orignalimage= wp_get_attachment_image_src(get_post_thumbnail_id(),'full');
$imageurl=$orignalimage[0];
//now to show the image you can use the html <img> tag
echo '<img src="'.$imageurl.'"/>
//you can also give the height width and other parameters.
endwhile;
0

If you can change your CSS, just remove max_width on the .site-inner, .wrap line ( .site-inner,.wrap{margin:0 auto;max-width:1140px;}) and the theme will adapt to big-size screens.

Otherwise, remove img selector from embed, iframe, img, object, video, .wp-caption { max-width: 100%; } ( to embed, iframe, object, video, .wp-caption { max-width: 100%; } ) and the image will be displayed with the size indicated inline in the width attribute of the img tag.

  • Simon, I have solved the image size part, but the post seems not extending along with the image. – user2532458 Dec 19 '13 at 0:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.