Opera FAQs, Tips, Tricks & Tweaks

Tips for Opera browser since 2005

Disable auto fit to window of large images in Opera

, , , , , , , , , , , , ,

Opera 11.10 shrinks large images to fit in window and several users don't like this and they want an option to disable it. Auto fit to window of large images can be disable this using any one of the methods below.

Extension
  1. Install Image Autosizer extension.
  2. O Menu > Extensions > Manage Extensions > Gear icon for Image Autosizer > Preferences > Advanced > View modes > When image is larger than window > Enable default & Original

Image Autosizer extension advanced options
Image Autosizer extension advanced options

Style Sheet
  1. Copy C:\Program Files\Opera\styles\image.css in Windows OS or /usr/share/opera/styles/image.css in Linux OS to profile\styles directory. This is to avoid overwriting during update and to make backup easy.
  2. Add the following CSS code to the bottom of copied file and save.
    /* Disable auto resizing of large images code starts here */
    *, *::before, *::after {
        position: static !important;
        height: inherit !important;
        width: inherit !important;
        cursor: default !important;
        padding: 0px !important;
        margin-left:auto;
        margin-right:auto;
    }
    /* Disable auto resizing of large images code ends here */
  3. Choose modified Image Style File and save.
  4. Restart Opera.
This method won't center smaller images.

User JavaScript

Create a NoImgAutoResize.js file with the following code inside userjs directory.

// ==UserScript==
// @description Disables auto resizing of large images
// @author Fartan
// ==/UserScript==

if(document.querySelector("head>link[rel='stylesheet'][href='opera:style/image.css']")) window.donotrun=true;

[Bertalan Dávid & Fartan via forums]

Tamil New Year Giveaway: Introducing HTML5 BookMy Favorite Opera Extensions

Comments

A.shunshunyi Tuesday, April 19, 2011 9:16:08 AM

V5 up

p.s. The My opera theme is beautiful love

Tamil Tuesday, April 19, 2011 9:20:13 AM

Originally posted by shunyi:

The My opera theme is beautiful

Thanks to SyamsulHadi.

ersi Tuesday, April 19, 2011 9:32:25 AM

There should be a checkmark in opera:config of course. But thanks for these instructions up

Tamil Tuesday, April 19, 2011 9:35:34 AM

Originally posted by ersi:

There should be a checkmark in opera:config of course.

http://files.myopera.com/Tamil/Smilies/Yes.gif -

Unregistered user Tuesday, April 19, 2011 10:36:35 AM

noone writes: This is suck. Do you think this is good solution? really?

Tamil Tuesday, April 19, 2011 10:45:04 AM

rolleyes

Dacotah Tuesday, April 19, 2011 2:17:00 PM

banana banana banana banana

Tamil Tuesday, April 19, 2011 3:10:39 PM

Dustin WilsonKhadgar Tuesday, April 19, 2011 4:25:07 PM

Woohoo. Lots of

bananabananabananabananabanana

Now I can use Make It So again. The default image sizer is awful.

Tamil Tuesday, April 19, 2011 4:26:28 PM

Dacotah Tuesday, April 19, 2011 4:40:44 PM

bigsmile

mike-bak Tuesday, April 19, 2011 9:44:10 PM

Originally posted by ersi:

There should be a checkmark in opera:config of course. But thanks for these instructions


up

angleritzangler Wednesday, April 20, 2011 3:19:02 AM

I was just thinking how the auto image shrinking feature was annoying the other day and was planning to go turn it off in opera:config soon. As already pointed out here, it can't be disabled via opera:config. I hate to have to go download an extension just to configure something simple like this, especially to just disable this feature.

This is exactly what I feared when Opera announced the support for extensions...

Cutting Spoonhellspork Friday, April 22, 2011 12:27:24 AM

I think you can expect a preference, same as SOCKS config and showing the Mail Panel automatically. I think Opera wanted to get feedback on autosizing, and image control extensions are very popular (they were also popular as userscripts, before extensions happened).

Similar to the way Speed Dials have changed, but there also are several ways to adjust them. This is still a learning period, what extra features to include vs what extra features need an API.

Unregistered user Monday, April 25, 2011 11:43:35 PM

Anonymous writes: Opera should stop trying to copy other browsers' retarded features (seriously, auto-downsizing images? way to waste my time & CPU with something Microsoft implemented in IE like 10 years ago, and even then was pointless) and continue what they started out doing: innovating features that other companies copy, and developing the fastest, leanest, most standards-compliant browser on the market.

walterbugscout Thursday, April 28, 2011 10:45:19 AM

pirate

Unregistered user Wednesday, May 11, 2011 12:51:37 AM

ibaysevenfold writes: good opera mini

Maarten MeurisNyerguds Tuesday, May 24, 2011 2:09:39 PM

The CSS fix aligns my image to the top of the screen. Can it be somehow be centered like it was originally?

Tamil Tuesday, May 24, 2011 2:41:50 PM

Use extension.

QuHno Sunday, May 29, 2011 6:59:49 PM

One of the worst things about that **** autoresize is, that every image that got resized is stored in full size in the profile icons folder and it seems that it will be deleted only if I choose "delete all favicons" etc. in the clear private data dialog.

Tamil Sunday, May 29, 2011 11:53:42 PM

All opened images irrespective size is stored in icons directory. http://files.myopera.com/Tamil/Smilies/Sad.gif -

QuHno Monday, May 30, 2011 3:21:50 PM

Swordfish build 1024 corrected it - only 16*16px favicons are stored sherlock

Tamil Monday, May 30, 2011 3:25:42 PM

up

NoFanboyNofanboy Tuesday, May 31, 2011 3:14:55 PM

I am using the image.css file method, working perfectly! Tamil, you're the Greatest! Thanks so much!

And it is a pity that such a workaround is necessary, it would have been so easy for Opera to have an option in opera:config or in Ctrl-F12 for not resizing images.

(The extension for this never stops loading when applied to images - but the CSS method works perfectly.)

Unregistered user Wednesday, June 8, 2011 1:37:04 PM

skib writes: Only the width, height and cursor css seem to be required, and handily leaves the image centered as #24 requests. As far as I can tell it behaves how it used to like this. (just modified the img section of image.css) img { display: block; height: inherit !important; width: inherit !important; cursor: default !important; margin: auto; }

Unregistered user Thursday, June 30, 2011 3:15:52 AM

V12 writes: I just tried both CSS and JS methods with Opera 11.50, but large images continue to display shrinked by default. Any other ideas?

Unregistered user Thursday, June 30, 2011 4:17:44 AM

V12 writes: Edit: CSS method works, but only if modify original file: C:\Program Files\Opera\styles\image.css

cremoso Thursday, June 30, 2011 8:25:40 PM

Thank you up

Unregistered user Friday, July 1, 2011 10:19:34 PM

Anonymous writes: opera 10.50 -NO WAY TO DISABLE AUTO IMAGE FIT/RESIZE!!!!!!!!!!!!! they are destroyed people; image resize is a very serious business-unless done properly,heavy artifacts arise

Unregistered user Tuesday, July 12, 2011 5:44:19 PM

nocturnal YL writes: I love you for this, Tamil!

James132 Thursday, September 1, 2011 10:23:28 PM

Thank you for this, it is a big help. I did a bit of further digging and came up with an alternative bit of CSS:
body.contain > img { 
-o-object-fit: inherit !important;
cursor: inherit !important;
height: inherit !important;
width: inherit !important;
 }

With this all image sizes still stay centered, it simply overrides the class that Opera applies when you open the image. Hope this helps.

Tamil Monday, September 5, 2011 8:39:45 AM

up

Unregistered user Sunday, September 18, 2011 4:04:39 AM

Anonymous writes: Also edit the line "padding: 8px" to "padding: 0"; this removes the white space at the top of the screen

Unregistered user Friday, May 18, 2012 7:34:17 PM

Анонимно writes: Opera 11.60 userjs fix not working anymore :(

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies