Jump to content

Inserted images cropping to window size.


Ryan Pierce
 Share

Recommended Posts

I'm inserting some images into a rich text editor and, by default, PW is inserting cropped images based on the size of my browser window. If I insert a picture smaller than my browser window, it gets uploaded at full resolution, but if it's bigger, the cropped image is used.
 
Is this by design? If so, how can I turn it off so that full size images are uploaded by default?
 
PS I've checked "Skip width and height attributes on image tags" in the 'Page Edit Image' module and it hasn't helped - but I think that's unrelated anyway.

Thanks!

Link to comment
Share on other sites

Sounds to me like you might have max width/height settings defined in your images field (Setup > Fields > [your image field] > Input). 

If that's not the case, then what you are seeing is just client-side scaling in your browser. And there shouldn't be any cropping. The image is full resolution, but just being scaled to 100% of the container width. That doesn't mean the image is actually that size. That just means that it's presenting it to you in a manner so that you can see the full contents of it. When inserting into your rich text field, do so by clicking the image button in the toolbar, rather than by dragging the image into there. The act of dragging may cause your browser to insert its own width/height tags as part of the clipboard data. 

Link to comment
Share on other sites

Here's what I'm doing:

On a fresh install of PW, I'm starting a new post on the basic-page template with a browser size of about 600px wide. I upload a picture more than 1000x1000px and click insert image in TinyMCE. I select the image and go straight to clicking insert to post. The image that is inserted is scaled to fit the size of the editor but when I click Publish, the image that is uploaded and embedded is <img src="/site/assets/files/1007/cover.400x0.jpg">. From what it looks, it is creating a cropped copy by default.

Link to comment
Share on other sites

Ah now I can reproduce this. 

But I don't see a solution to this shortly, the image resizing and PW image plugin takes the window size to resize the image selected if original is bigger. There's so many parts involved and there's a lot of width height going on all over it's hard to track down. And it's not a bug but a more of a feature after all. 

If you select an image, you get presented with a resize dialog, if the image is scaled down, you'll see a "link to larger version (1200x800)" checkbox with the original image width. You can renter and set the width or height to the width and height inputs and then click insert image.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...