Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Hi,

I have a cover image assigned to portfolio pages:
Code: Select all
<cms:editable name='project_image' label='Cover Image' crop='1' width='100%' height='100%' type='image' show_preview='1' preview_width='200' />

However, on the page it is displaying the 200×200px preview from the admin area.

Please help.
@hennhoneyball, try this:
width='200' height='200'
Join COUCH:TALK channel here https://t.me/couchcms_chat
Ryazania — a framework to boost productivity with Add-ons viewtopic.php?f=2&t=13475
Support my efforts to help the community https://boosty.to/trendo/donate
@trendoman, thanks for the response.

Wouldn't that specify that the dimensions of the image should be 200×200px?

I tried it but it didn't work...

I need the image to display at 100% of its size.

I've tried removing the preview, but nothing's changed.

Attached is an image of how it's displaying.

Attachments

@hennhoneyball,
on the page it is displaying the 200×200px preview from the admin area.

If the problem is that the image shows up 200×200px as preview in the admin-panel, that is because you have specified the 'preview_width' to '200' -
<cms:editable name='project_image' label='Cover Image' crop='1' width='100%' height='100%' type='image' show_preview='1' preview_width='200' />

Please remove the 'preview_width' parameter completely and the preview now should show whatever dimensions the image actually is saved as.

However, if you meant that the image itself is being saved as 200×200px, I don't quite see why that should be so. The 'width' and 'height' parameters always expect simple integers so the 'px' part would be ignored making the image getting cropped to 100x100
<cms:editable name='project_image' label='Cover Image' crop='1' width='100%' height='100%' type='image' show_preview='1' preview_width='200' />

Please check if your site's CSS is not fudging the dimensions.
@kk,

Thank you! I misunderstood the how the width and height parameters worked. That was the problem.

All resolved now.
5 posts Page 1 of 1