Skip to main content

Blogger - Add Images with Full width

Display Images - Fit to Page Width

To add image in a Blogger page, we can either drag and drop or Click-> Insert image in the tool bar..

When we add in either way the image box is restricted automatically to the size of 320, even if the image is bigger. 

Lets suppose you have the page width set as 960 and you want it to the full width..

Solution 1:

One option is you can drag the box by the corner (to maintain aspect ratio) and fill to full width along with height..

This works good...

Solution 2:

But if you large number of images in the page like 20 image you have to add, and you have to drag manually. In that case, instead you can  got to HTML View by clicking the first Icon in the tool bar to switch from Compose View to HTML View.

You can see a div tag within which and anchor tag and img tag nested it..

In the img tag, you have to change the width to 100% instead of specific number and remove the height attribute.

Also if the url in the img tag has something like s320, you change that to s1600 or to whatever value in href attribute of anchor tag.

You can use Notepad++ to replace by copying the html and formatting with XMLTools plugin -> Pretty Print..

Regex Search for height="[^ ]*" and replace with empty

Regex Search for  width="[^ ]*" and replace with  width="100%"

String Search for s320 and replace with s1600 

Example

Before

<div class="separator" style="clear: both; text-align: center;">
    <a href="https://blogger.googleusercontent.com/img/a/sfasfasfs" style="margin-left: 1em; margin-right: 1em;">
    <img alt="" data-original-height="1640" data-original-width="1112" height="240" src="https://blogger.googleusercontent.com/img/a/sfasfasfs" width="163"/>
</a>
</div>

After Replace

we can see the bold ones in the original are changed/removed in the below one...

<div class="separator" style="clear: both; text-align: center;">
  <a href="https://blogger.googleusercontent.com/img/a/sfasfasfs" style="margin-left: 1em; margin-right: 1em;">
    <img alt="" data-original-height="900" data-original-width="600" src="https://blogger.googleusercontent.com/img/a/sfasfasfs" width="100%"/>
</a>
</div>

Comments

Popular posts from this blog

Keep Updated on Software Technology - Books - The Hard Way

Software Tech - Staying Updated via Books - The Hard Way .. To keep yourself updated on current technology used in Software development & operations, there are various sources at varying level of technical content. Blogs & Articles Videos on Youtube Books Videos from Publishers Courses from LMS Platforms Book Publishers Of all, only Books are the source of detailed information on a subject. Although all publishers are not equal, many good publishers exist in IT Software development.. Below are the important publishers, listed on their content importance balanced on both quality and diverseness.. 1.  Addison Wesley Professional (AWP) ( www.informit.com ) This is part of Pearson IT, focussed on professional books instead of Educational. Quality content mostly on design. Pearson has other imprints like Que and Sams publishing with different levels of content, but awp is top notch content.. 2.  Wi...

Tech Stack

 Technology Stack Platform - Java 1. Java - Specifically from Java 9 to 17 - Hand-on on Latest Features 2. Jakarta EE 10 3. Spring Boot 2/3 4. Spring Cloud Platform - Node 1. NodeJs - Node 18 LTS 2. Express 3. Sequelize Platform - UI 1. JavaScript - ES6 to NextJS  2. jQuery 3. ReactJs 4. Angular Platform - Data/Streaming 1. Mongo 2. Redis 3. Cassandra 4. Kafka 5. RabbitMQ