We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Images with posts, best practices

How Do I?

Linda A's avatar
Linda A
647 posts
9 years ago
Linda A's avatar Linda A

I am looking at attempting a much overdue redesign of my EE site, in part to try and make it responsive. One of the things I want to do is ensure that our various news channels are a bit more visually appealing and include images more often than not. However, I haven’t really come up with a workflow that makes sense to me, so I have some questions I’d love some input on:

1) How do most people approaching adding images to a news article? Embedding them within the text field or storing them in a separate field that has a predefined place within the article? Pros and cons for each method? We currently embed within the text field, but it seems like it isn’t always ideal.

2) For some of our news channels there isn’t always a new, topical image to go with each post. Is it possible to have a selection of images associated with a channel or a category where you can easily pull in a random image for those scenarios?

       
Russ K.'s avatar
Russ K.
114 posts
9 years ago
Russ K.'s avatar Russ K.

To reply to your frist question, I looked for a good, simple way to handle images in a responsive layout and couldn’t find one… Almost all of my designs are responsive.. so I create predefined image fields and give them a spot within the layout. That has been the simplest solution for my clients .. most of whom don’t want to me messing in the HTML of a text field.

As a result, the layout gets to be a bit less flexible… although it allows you to maintain the integrity of your layout. so you decide if that is a pro or con… Also, it allows me to call a specific image size for specific places in the layout which is great for page load. The less I can leave to my users the better. Most are very happy just knowing what to add & where & let the template do the rest.

In this scenario, I have toyed with giving the user the ability to decide to place the image at the top of the text area, bottom, float it left or right & then define a page structure based on that… this works OK, but creates more layout development work than I prefer.

Cool thing about EE is that because you design the CMS, with a little creativity, there are ways to handle almost everything.

On your second question, yes… I do something similar using a grid that allows me to add multiple images and alt tags, then just limit to a single, random image in your layout. On another site, I have a channel that The client can upload as many beauty images as they want and when the page loads the channel selects one at random to use as a background image…

Russ

       
Linda A's avatar
Linda A
647 posts
9 years ago
Linda A's avatar Linda A

Yes, what you describe does sound appealing in that it keeps the integrity of the layout. We don’t have multiple users adding content, its just me and my partner, but we often have issues with the image placement leading to awkward text wrapping and so on. If the images have their own fields, I can test for whether they are empty or not and adjust accordingly.

Being able to pick where the image ends up would be appealing as well as we often deal in different image sizes as well as some video content.

Of course, if I switch mid-stream, I need to consider how that will affect existing content as we have archives going back over a decade in some cases.

       
Rob Allen's avatar
Rob Allen
2,950 posts
9 years ago
Rob Allen's avatar Rob Allen

Quite often I create a grid field for content, with fields for Image, (sub)Heading, and text. The author can then add as many grid rows as required for the article.

Once you have the content in place you then have tight control over display, styling etc.

       
Linda A's avatar
Linda A
647 posts
9 years ago
Linda A's avatar Linda A

Oh, that’s a nice idea, though it would require starting over with these channels and that’s not doable. But if we add another, I think I will go that route. That would make it very easy to control the layout.

Edited to add: After considering that further, I suppose it should be possible to add in a grid field as long as I don’t make it mandatory to be filled out. That way it can be introduced now even though older posts won’t have it. So this would be a possible solution. Thanks!

       
Rob Allen's avatar
Rob Allen
2,950 posts
9 years ago
Rob Allen's avatar Rob Allen

Yep just adding a new field is easy to do 😊

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.