-
Hi,
I’m tweaking my Ghost blog for the Zero theme. Everything works well except that the images within the post (not the title image) do not resize themselves to the width of the text. They are displayed of their original size, bleeding out of the column and the page. This happens in both desktop browsers and on the phone.
Although this problem can be dodged by resizing the images manually before uploading, I still want to know if there is a way that I can solve it automatically.
Thank you!
Actually, the problem cannot be solved by manually resize the image for uploading. The resized image is still displayed too large on the phone.
Hi Miroslav!
.blog-post-1.ff-section .post-content p img {
/* width: 750px;*/
width: 100%;
}
It seems that writing the width in pixels only works for the desktop, but writing in percentage works well for both desktop and laptop.
Is default.hbs the best place where I add this code to? I’ve tried doing this in those .css files, but it didn’t work. Maybe the .css files in /assets/css/parts need to be complied into screen.min.css before uploading?
Hi,
Actually I’ve fixed the problem in my site by adding the above-mentioned code, so the page looks correct:
http://shi-weili.com/little-universe/
What I was talking about is the images in the article (not the title image). Will the original zero theme, those images will look huge.
Also, there is another related problem:
Vimeo videos in the articles (not in front of the article) cannot be properly resized. In the above article I used the embed code from Vimeo to set the size. The videos look correct in desktop browsers, but will look huge on a phone.
The topic ‘Image size in posts’ is closed to new replies.