Switch Theme:

[img] tag attributes?  [RSS] Share on facebook Share on Twitter Submit to Reddit
»
Author Message
Advert


Forum adverts like this one are shown to any user who is not logged in. Join us by filling out a tiny 3 field form and you will get your own, free, dakka user account which gives a good range of benefits to you:
  • No adverts like this in the forums anymore.
  • Times and dates in your local timezone.
  • Full tracking of what you have read so you can skip to your first unread post, easily see what has changed since you last logged in, and easily see what is new at a glance.
  • Email notifications for threads you want to watch closely.
  • Being a part of the oldest wargaming community on the net.
If you are already a member then feel free to login now.




Made in us
[ARTICLE MOD]
Fixture of Dakka






Chicago

Is there a way to specify additional attributes for an image included in a post with the [ img ] code? Specifically, it would be really useful to have the ability to specify a width/resize for a photo that is hosted elsewhere, but that you want to put in a post.

I looked around to see if this was possible, but I didn't see any documentation for it.

I'm thinking that
[ img width=500px ] and [ img width=50% ] would both be useful ways to go about this.

   
Made in gb
[ADMIN]
Decrepit Dakkanaut






London, UK

There is no way to do so at the moment. While it is relatively simple for me to add, I have kept away from doing so in the interest of making the site flow better on all formats. Any image you embed that is larger than the display size of the user viewing, will be automatically resized to 100% of the available space. Beyond that, there are few uses for the code that would justify its implementation from what I can tell.

Check out our new, fully plastic tabletop wargame - Maelstrom's Edge, made by Dakka!
 
   
Made in us
[ARTICLE MOD]
Fixture of Dakka






Chicago

Well, to make a really big picture not be 100% of the viewable size is really the only use.

I don't understand why it would prevent the site from flowing. Not challenging your decision, but can you explain what you mean?

P.S. Here is a use case, which is why I posted this:
http://www.dakkadakka.com/dakkaforum/posts/list/120/275581.page

I didn't realize my picture was quite that big when I put it in there. It got resized to 100% of the available space, but it's still huge, and disrupts the flow of the conversation. I'd have really liked to be able to edit my post and drop it to maybe 30% of it's original size.

   
Made in gb
Junior Officer with Laspistol





Sheffield, England

Usually I just resize and save a smaller version of the file if I want to do something like that, or just post a link to it rather than embed.

The 28mm Titan Size Comparison Guide
Building a titan? Make sure you pick the right size for your war engine!

 
   
Made in gb
[ADMIN]
Decrepit Dakkanaut






London, UK

By 'flow' I mean two things...

First, it prevents abuse by people sizing an image to be 10,000 pxels high and messing up the scrolling.

Second, it forces people (like The Dreadnote) to resize the image before inserting, which leads to a smaller file size, better performance and cheaper performance where people have to pay data tariffs on things like phones.

The dakka gallery even resizes images automatically to a whole range of widths, medium/600px being the optimal for forum display and small being good for very tall images. My hope is that people get encouraged to use that instead for their wargaming images. Photobucket and a lot of the other image hosting places also do the automatic resizing which should suit most people too.

Check out our new, fully plastic tabletop wargame - Maelstrom's Edge, made by Dakka!
 
   
 
Forum Index » Nuts & Bolts
Go to: