Insert inline image v10b2

Post

Posted
Rating:
#238 (In Topic #99)

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 compo.sr 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……..

Post

Posted
Rating:
#267
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.
1 guest and 0 members have recently viewed this.