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 ?
-
This topic was modified 4 years by
SidCowans33.
-
This topic was modified 4 years by
SidCowans33.
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!
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 ?
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!
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.
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!
Sorry for the delay in replying Simon but pleased to report that your proposed solution worked perfectly. Thank you very much !
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.
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.
-
This reply was modified 3 years by
SidCowans33.
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
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!
I don’t have any issues with thumbnails that I’m aware of. My problem is with the images in the single post placeholder.
Hi,
It seems that the website is in maintenance -> https://i.imgur.com/Wm1NFZa.png so I can not check it.
Thank you!
The site is not live yet hence being in maintenance mode. I can provide you with admin access if I can contact you privately.
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!