Insert inline image v10b2
Posted
#173
(In Topic #41)
Standard member

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……..
Posted

Site director

- The new behaviour of the WYSIWYG image button is optional. It's the "Simplified attachments UI" option.
- You can click the WYSIWYG Comcode button and go to 'media', which will let you select from the File/Media Library (uploads/filedump)
- 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.
- 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.
- 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.
- 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 Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- 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.
1 guest and 0 members have just viewed this.