Archived topic
Images are distorted
7 replies · Started by Anonymous on February 3, 2015
The theme displays images wrongly. Pictures appear widened some 2-4 millimeters along their width and shortened 2-3 millimeters along their height.
I insert images of 900px or 1024px in the post body, with the body width set at 1200 in the customizer. (Some "container" in the styles is then set to 1100, but I don't know what it means). Anyway, if I cannot solve this issue, I'll have to look for another theme that doesn't mess with my images.
Another "distortion". Tiled galleries were shown full-width of the content area beautifully in another theme. In GP the tiled gallery box takes only half of the content width, cannot even be centred. Is there a line of code somewhere in Style.css or other file that commands the layout of tiled galleries? I am using Jetpack WP functionality, now other gallery plugin is used.
Hi Andrey,
Thanks for pointing out the tiled gallery issue - I've fixed this bug and it will be released in the next version. If you'd like the fix right away, you can email me temporary admin access to support@generatepress.com and I'll make the tweak to the code for you.
As for the original distortion question - can you link me to a page where this is happening so I can investigate further? GP doesn't do anything to images inserted by WP, so I'm curious as to what's happening.
Thanks!
Hi Tom! Details sent. :-)
Ah - I see what you mean about the distortion.
WordPress natively adds 10px to the caption width in order to give the image a border look - which in my opinion is an old, over-used style.
You can remove this extra padding by adding this PHP snippet using a plugin like this: https://wordpress.org/plugins/code-snippets/
function generate_remove_caption_padding( $width ) {
return $width - 10;
}
add_filter( 'img_caption_shortcode_width', 'generate_remove_caption_padding' );
I would add it to the core of GP, but WP.org most likely would reject it as it alters default WordPress behavior.
Thank you, Tom!
Glad I could help :)
Received permission from WP.org to include this as default in the theme, so you can remove the function you added once 1.2.8 is released.
Thanks!