0

So I have the problem, the image I want to dispaly in post is not big enough and in my preffered size it gets bad quality, then i noticed that is not the default size image returned it's medium size and I tried to check but didn't find anything in particular.

while ( have_posts() ) : the_post();
    the_content();
    args = array( 'post_type' => 'attachment', 'orderby' => 'date', 'order' => 'DESC', 'post_mime_type' => 'image' ,'post_status' => null, 'post_parent' => $post->ID );
    $attachments = get_posts($args);
    $categories = get_the_category();
endwhile;

closed as off-topic by Tom J Nowell Jul 7 '14 at 22:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Where are you displaying this image? If it's in your post content then you're dealing with a purely UI editor not a development issue – Tom J Nowell Jul 3 '14 at 11:56
  • Yes I load this image from post content, but so how can I make to be default size, from post editor? – Driglou Jul 3 '14 at 12:04
1

The UI might be slightly different depending on what version of WordPess you are running but just before you select the insert button/link, simply just select 'Full Size' size image from the dropdown menu.

enter image description here

  • Found it :) Indeed, is the first project I do with wordpress and I just didnt noticed anything there, and was looking more in media, on image by itself and its settings than on inserting to post. Thank you so much. – Driglou Jul 3 '14 at 13:43
0

Try to upload image from featured image option and to fetch it use the below code where you can set height and width parameters according to your need:

<a href="<?php echo get_permalink($post->ID);?>"><?php if ( has_post_thumbnail()) {
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
    echo '<img class="alignleft" src="' . $large_image_url[0] . '" title="' .                                           the_title_attribute('echo=0') . '" width="100px" height="100px" ">';
}?></a>
  • the problem is that I use featured image for the whole post and i want to display the image of the post as well but if my default image is 600px wide, in post is only 30. – Driglou Jul 3 '14 at 13:37

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