Advertisement:

Author Topic: maximum size of images  (Read 1142 times)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 67,877
    • Arantor on GitHub
Re: maximum size of images
« Reply #20 on: November 05, 2017, 04:46:27 PM »
max-width and max-height are directives you can put into CSS, which you can tag onto almost any element to prevent its size going bigger than intended.

In this case, I'd probably ditch the settings in SMF's admin, and replace them both with CSS in your theme's index.css file:

Code: [Select]
.bbc_img {
  max-width: 1200px;
  max-height: 600px;
}

This should make it so that images in posts go no bigger than 1200px wide and 600px high, and it should retain its aspect ratio and shouldn't need anything else - and then you can remove SMF's directive and it will even work on SVG images too.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline brynn

  • Jr. Member
  • **
  • Posts: 346
  • Gender: Female
    • Inkscape Community
Re: maximum size of images
« Reply #21 on: November 07, 2017, 04:03:11 AM »
I'll give it a try.

Thanks for everyone's help and patience.  Much appreciated   :D
Inkscape Community  (SMF with Tiny Portal)

Inkscape for Cutting Design  (originally a phpBB forum, converted to SMF, and using Simple Portal)

Offline brynn

  • Jr. Member
  • **
  • Posts: 346
  • Gender: Female
    • Inkscape Community
Re: maximum size of images
« Reply #22 on: November 07, 2017, 05:01:38 AM »
Actually, one last question.  Does it matter where in the index.css file, I put it? 

I see there are all sorts of different sections and categories, and probably this should go in some particular section.  And the files are probably different for each theme.  So if you could tell me what to look for, I can probably find it.

Oh, or tell me where to put it in the default/Curve theme, and I can probably figure it out for the other themes.

Or should I just make a special new little section?  (the one I'm looking at has all kinds of comments inside /*commment*/, to identify what it does.)

Thanks again
Inkscape Community  (SMF with Tiny Portal)

Inkscape for Cutting Design  (originally a phpBB forum, converted to SMF, and using Simple Portal)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 67,877
    • Arantor on GitHub
Re: maximum size of images
« Reply #23 on: November 07, 2017, 05:44:07 AM »
In this case, no it doesn't matter. Other stuff can matter, but this shouldn't.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline brynn

  • Jr. Member
  • **
  • Posts: 346
  • Gender: Female
    • Inkscape Community
Re: maximum size of images
« Reply #24 on: November 07, 2017, 07:39:15 AM »
Awesome, thanks again!
Inkscape Community  (SMF with Tiny Portal)

Inkscape for Cutting Design  (originally a phpBB forum, converted to SMF, and using Simple Portal)

Offline brynn

  • Jr. Member
  • **
  • Posts: 346
  • Gender: Female
    • Inkscape Community
Re: maximum size of images
« Reply #25 on: November 12, 2017, 07:55:50 AM »
Sorry for re-opening this.  I've tried using the code you gave me.  I thought you said it would work for SVG images.  But on the first try, not working.

Here's the code I used.  I put it right at the top of index.css.  Saved, uploaded and overwrote, and also I confirmed it was overwritten.  And I changed the SMF settings (as mentioned in the op) back to zero.  I haven't changed the other themes yet, only Aqua Style theme (our default).

Code: [Select]
/* Styles for the general looks for the Curve theme.
------------------------------------------------------- */

/* brynns image size fix. */
.bbc_img {
  max-width: 800px;
  max-height: 600px;
}
/* Normal, standard links. */
a:link, a:visited

Here's a link to the message where I made the first test:  https://forum.inkscapecommunity.com/index.php?topic=815.msg5787#msg5787

Ooohhh....why are there 2 index.css files?  I had edited Themes/Aqua/index.css.  But now, after more looking around, I found....looks like the exact same file in Themes/Aqua/css/index.css.  But it didn't get edited along with the other one.

Do I need to edit both of them?  Do I have some problem indicated by having 2 of them?  Or does the Curve/default theme have to be edited, before the change starts to show up?   :o

Thanks
Inkscape Community  (SMF with Tiny Portal)

Inkscape for Cutting Design  (originally a phpBB forum, converted to SMF, and using Simple Portal)

Offline sǝๅqɯɐɥS

  • SMF Hero
  • ******
  • Posts: 4,478
  • Gender: Male
    • i30 Owners Club
Re: maximum size of images
« Reply #26 on: November 12, 2017, 08:34:26 AM »
Hovering over the element inspector shows you which file you needed to edit ;)


Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 54,985
  • Gender: Male
    • Kindred-999 on GitHub
Re: maximum size of images
« Reply #27 on: November 12, 2017, 09:04:23 AM »
Also, css is executed from the top down
 New code should be placed at the BOTTOM/END of the file
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline brynn

  • Jr. Member
  • **
  • Posts: 346
  • Gender: Female
    • Inkscape Community
Re: maximum size of images
« Reply #28 on: November 12, 2017, 11:11:48 AM »
Ok, thanks for the info, folks.

Trying again....
Inkscape Community  (SMF with Tiny Portal)

Inkscape for Cutting Design  (originally a phpBB forum, converted to SMF, and using Simple Portal)

Offline brynn

  • Jr. Member
  • **
  • Posts: 346
  • Gender: Female
    • Inkscape Community
Re: maximum size of images
« Reply #29 on: November 12, 2017, 12:13:52 PM »
Yay!  Finally got it working.

In the end, probably won't stick with it.  But I still appreciate all your help!

Solved again :)
Inkscape Community  (SMF with Tiny Portal)

Inkscape for Cutting Design  (originally a phpBB forum, converted to SMF, and using Simple Portal)