Jump to content

Recommended Posts

Posted

Is there any way to overwrite a file instead of appending a counter (filename-1.ext)?

I have to use an image multiple times in a multiimage field and don't want to load several versions for the same image.

thanks!

Posted

oh, long story …

it's for sizing (width, height, ratio) an element equal to the image next to it. this was a last minute request from my editors shortly before the launch of the website.

kind of a dirty hack, but the the only way out, without a major revamp of the templates and fields.

Posted

hm, no sorry, i think i failed to explain my reasons clearly …

i don't need a thumbnail. i need the exact same image or at least an image with the exact same dimensions.

it doesn't show up in the frontend. it just defines the dimensions of a div, which has to be the same width and height as the image next to it.

something like this:

bacon.jpg

the div on the right side is set to position: relative;

the image (visible here for explanation) is display: block and defines the dimensions of the div.

the red div is set to position: absolute; top: 0; right: 0; bottom: 0; left: 0;

this way, the text div will always be the same size as the image.

but, never mind, i figured out another way, so this question can be closed/deleted. i just wanted to explain my weird wishes …

Posted

What about using $image->width and $image->height to get the size of the image. Although I am not sure if you are defining this in the template already anyway, or if you are grabbing it from the original uploaded image. Anyway, thought it might be of some help.

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
  • Recently Browsing   0 members

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