How do I change single post placeholder for Featured Images ?

Posted in: Newsmag
Post count: 30

All of my images are pre-cropped to a maximum 1000px height or width with most being landscape format so 1000px wide. When I select these as my featured images, the resulting post page displays the image with a thin grey bar down the right side which suggests the placeholder width is something like 1024px or 1068px. How do I change that to 1000px ?

Post count: 20688

Hi,

The post templates use thumbnails to display the featured image, these would be the sizes that are used for them – https://i.imgur.com/7hCV0YQ.png

If the original image used as featured is large enough to allow the theme to create the needed thumb, depending on the post template used, and if the thumb size is active, the theme will create the thumb and use it. If the image is not large enough or the thumb size is not enabled, the theme will use the original image.

Could you provide an example of this issue happening on the website? I will check it. Let me know.

Thank you!

Post count: 30

So I can’t actually fit a 1000px image on the post page perfectly as none of the placeholder options offer 1000px thus a small grey border will appear ?

Post count: 20688

Hi,

It will fit, but there will be some remaining space on the side.

Post templates for example like this https://demo.tagdiv.com/newsmag/my-girlfriend-has-exhausted-our-strategic-supply-of-string-cheese/

The width there is 1021px. If the original image is smaller, there will be remaining space on the side https://i.imgur.com/VZq2dZi.jpg
Post templates 4,5,8 require an image of at least 1021px.

Maybe I could provide a solution if you use such a template. Something like reducing the image container to a max of 1000px, and adding borders left/right, it would look like this
https://i.imgur.com/OxpWkMs.jpg
This way a 1000px image would display better. Would you consider this a solution? Also, what post template are you using exactly?

Let me know.

Thank you!

Post count: 30

Yes, I can see what is happening and you are right in that it leaves a small space. All of my images are pre-prepared as a maximum 1000px height or width which, if I had known what was coming, I would have changed to a maximum of 1021px !

I’m using post template style 4.

Post count: 20688

Hi,

You could try what I suggested in this case. The solution I mentioned above will limit the featured image container to a maximum of 1000px, center it, and will add a border on the sides so that the new width integrates better with the design.

This way you can keep using the respective images as they are, get rid of the bar on the side, and maintain the overall design of the post template.

The code is here – https://pastebin.com/pAJQGAsX
Enter it in the theme panel custom CSS section – https://i.imgur.com/7UJyAjQ.png

You could give it a try. If there is a problem after using it, let me know, provide a link to the website where I can see it. I tested it on my test install and it works fine there.

Thank you!

Post count: 30

Sorry for the delay in replying Simon but pleased to report that your proposed solution worked perfectly. Thank you very much !

Post count: 30

Not sure if the added code is changing this but whilst the placeholder is perfect width wise, it is cropping the vertical height. All of my images are 1000px wide but the heights are variable so can that be reflected in the code otherwise I’m cropping some of the images.

Post count: 35449

Hello,
We are glad that the code that Simion gave you worked. This applies strictly to the width and edges, but has nothing to do with the height.
Thank you!

Post count: 30

Thanks Calin but how do I rectify my issue here ?

I have a large number of images, all of which are resized to 1000px wide for landscape orientation and 1000px high for portrait orientation. The other setting in both cases is variable.

The landscape orientation placeholder displays 1000px wide images perfectly for width but often crops out part of the height so is clearly trying to fit to a consistent height and they are not consistent height images.

The placeholder for portrait orientation images is all over the place and displays the image to the left and also crops out most of the height. It appears to be trying to force the portrait image into the placeholder set for landscape images.

I’m basically wanting the uploaded images to display in full, in the center and with no placeholder border showing.

Thanks for your help.

Post count: 205

Here you can see that in the attachment writing and content area width is 696px and I need a width of 728px and the sidebar area width must remain the same.
https://drive.google.com/file/d/1Qc9VwgPDhApRXXQjLotfWNGsJcqW6CfI/view
Please help with CSS Code
Website: Softfully [.com]
Thank you

Post count: 35449

Hello Viju,
I just checked your website and I see that you manage to set the main content to 728px -> https://i.imgur.com/tVuc8Vb.png

Hi SidCowans33, you can use the thumbnails also, you need to regenerate the thumbs -> https://forum.tagdiv.com/thumbnails-fix-strange-looking-images-on-blocks/
I hope this will help you. As for the featured image inside the posts, if is need we can use ca css to adjust it.

Thank you!

Post count: 30

I don’t have any issues with thumbnails that I’m aware of. My problem is with the images in the single post placeholder.

Post count: 205

Oh yes i already done

Post count: 35449

Hi Viju , I’m glad!

Hi SidCowans33, can you please provide a link to inspect the single post placeholder? In this way we’ll be easier to identify the problem and make a css for it.

Thank you!

Post count: 30
Post count: 35449

Hi,
It seems that the website is in maintenance -> https://i.imgur.com/Wm1NFZa.png so I can not check it.
Thank you!

Post count: 30

The site is not live yet hence being in maintenance mode. I can provide you with admin access if I can contact you privately.

Post count: 35449

Yes, you can contact us via email at contact@tagdiv.com also include the link of this topic so we can identify you easily.
Thank you!

Viewing 19 posts - 1 through 19 (of 19 total)
The forum ‘Newsmag’ is closed to new topics and replies.