Insert inline image v10b2


#173 (In Topic #41)
Standard member
windymillar is in the usergroup ‘Fan in action’

Insert inline image from uploads

This is a query on the WYSIWYG "image" control and a general design query on images that will be used on many pages, mostly in an inline style.

am working with the start page to work out how to use after a few years away from coding.

I have a couple of paragraphs of welcome text and an inline image.
I want to put some padding around the image to seperate it from the text.

When I use the WYSIWYG "Image" control it is now always presenting window to find a local file to upload, which goes into the uploads/attachments folder.  This puts in a link to the image in the html.
Using the "Image" control does not let me add an image that already exists in the uploads/website_specific folder.

What I then do is edit the image properties and change the references to my desired image in the uploads/website_specific folder.

Amending the global.css adds the padding ( though below only works for images aligned left ) :
.attachment_img { max-width: 100%; padding: 0px 10px 10px 0px; }

On occasion I lose the image and have to remove the HTML and re-add going through the process to upload an image from desktop first, so I can get an image on page and then change it to refer to the image I placed in the website_specific folder.

Potentially the "image" control is not functioning, as I expect it to anyway - to allow me to add an image that has already been uploaded.
But I am not sure whether I should be using the website_specific ( as it is an image that will be used in several places ) folder, or using the attachments item and do I include directly on the page or do I create a custom comcode tag to make it easy to include.
Then how do I style it to provide some clear space around the image when it is inline……..
Online now: No Back to the top


Site director
Chris Graham is in the usergroup ‘Administrators’
Quick responses from me…

  1. The new behaviour of the WYSIWYG image button is optional. It's the "Simplified attachments UI" option.
  2. You can click the WYSIWYG Comcode button and go to 'media', which will let you select from the File/Media Library (uploads/filedump)
  3. Using the file/media library is usually better than uploads/website_specific, but uploads/website_specific folder is defined for you to put whatever you want in, so if you like to, that's good too.
  4. You can either upload to uploads/filedump by hand, or via the File/Media library interface in the CMS zone. The interface gives you embed too, if you want to use that.
  5. I think the 'media' Comcode tag will let you style it, like you were doing with attachments. It effectively uses the same code as the attachment system – in v10 the new 'media system' is used by both the attachment system, and this direct 'media' tag.
  6. When it comes down to styling, it's a matter of CSS skills rather than Composr skills. Anything involving paddings sounds like the right track.

Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top
1 guest and 0 members have just viewed this.


Users online:

Philip, Vaiva, mytracker, Manu, babu, Salman

Forum statistics:
  • 1,361 topics, 5,909 posts, 7,289 members
  • Our newest member is PolicyGaga
Back to Top