- 04 Jul 2023
- 1 Minute to read
- DarkLight
Prevent Images Crop on the Members Portal
- Updated on 04 Jul 2023
- 1 Minute to read
- DarkLight
We recommend image sizes for all Members Portal images to ensure they look clear and unpixelated on most screens. We automatically crop these images for optimal display on smaller screens. While this dynamic resizing works in most scenarios, it isn't ideal if:
- You use images with text that can't be cropped to remain readable
- You simply want to display the full image
You can easily fix that by adding a code snippet on the Admin Panel. This snippet automatically resizes the image to fit in whatever space is available rather than cropping it to fit.
- Your home page banner
- Events
- Articles
- Courses
Log in to dashboard.nexudus.com if you aren't already.
Click on the Built-in files folder.
Click on the styles.css file.
Copy the code snippets of all the images you want to resize instead of crop on the Members Portal.
Home page banner
.home-banner__image .img { background-size: contain !important; }
Events
.card-event__image { background-size: contain !important; }
Articles
.card-blog-post__image { background-size: contain !important; }
Courses
.card-course__image { background-size: contain !important; }
Paste the relevant snippets in the styles.css file.
Click the Save button.
All done! Check your Members Portal to make sure images are now displayed as expected.