is it possible to set up a webyep image to scale and trim?
I want an uploaded image to fill a set sized box without it leaving any gap or overflowing out of the box. Obviously it needs to keep its proportions, just trim the excess off.
is it possible to set up a webyep image to scale and trim?
Not being a WY expert but if you are expecting the same sort of scale/trim control you get from the FW interface that isn’t going to happen. FW manages image manipulation quite differently from what you can get server side with WY - if you can get any at all without using server side technologies.
I think that the best you can hope for is image containers that resize to the image - and not images resizing to the container (without distortion).
That’s a shame, I thought that maybe there would be a way around it with some css.
Thanks Dave
Just noticed that the time stamp on this thread (I’m assuming it’ll be the same on all threads too) is showing the time to be an hour earlier than it actually is.
You can do this if the image is a background image to an HTML item, but not if it is a “foreground” image ( tag). The CSS would be something like this:
But if you are using a normal foreground image, the only thing you can do is force the entire image to be a different size with the height/width attributes.
Many CMSs have the ability to scale uploaded images to a certain “budget”, so you don’t end up serving a full-size photo out of your Nikon D800 (approximately the size of a tractor-trailer rig at 72ppi) to Web visitors. You will set a largest possible size somewhere in the configuration, and any photo larger than that will be resized by the server when you upload it so it fits inside that box (say, 1024px square). They generally don’t offer up any cropping or other fine strokes on an image-by-image basis, and rely on the editor to come up with photos ready to use.
I have written cropping/resizing tools in Rails before, it’s quite straightforward, and there are JavaScript UI kits to make it entirely WYSIWYG for the editor. But WebYep is not in that realm at all.
Walter
On Mar 4, 2014, at 5:35 AM, Steve wrote:
That’s a shame, I thought that maybe there would be a way around it with some css.
OK…If I cant get the image to restrict to a specific size, can I get another element on the page, eg a sidebar that goes next to the image to grow/shrink depending on the images dimentions; the content within the sidebar can scroll but the box must always be the same size as the image next to it.
Is that possible?
I’ve tried wrapping image and sidebar within a div and setting the sidebar to a fixed height of 100%, assuming that it would always keep to 100 % of its parent box and that the parent box’s height would be set by the images dimensions. But no luck.
Thanks Steve
On 4 Mar 2014, 9:06 am, DeltaDave wrote:
I think that the best you can hope for is image containers that resize to the image - and not images resizing to the container (without distortion).
Hi Max, Here is a link to my problem: http://94.136.40.103/~cheaper-school-prospectus.co.uk/laroche/welcometorochdal.php
as you can see the main image on this page is shorter than the sidebar to the right. The links & Diary dates are both web yep loops and currently will scroll if they extend past the bottom of their parent box.
Currently the image is set to fixed width & fixed height and the sidebar is also set to a fixed height equal to that of the image’s fixed height.
What I would idealy like is to have the image set to fixed width only with a flexible height and the sidebar’s height to then extend to the same height as whatever image the client adds (again with scrolling text).