Skip Navigation

Default "large" attribute to photos

Travel Forums System Talk Default "large" attribute to photos

1. Posted by Dodgey (Full Member 6 posts) 8y Star this if you like it!

Hiya - when I insert my blog photos I always insert the "_large" text before the file name so they show up, well, large in the blog. Is there a way to set this as my default when I insert photos? It adds a fair bit of time when I'm doing a large blog update on a slow connection.

p.s. I just read about the email option to update blogs - would be awesome if you could put certain markers, like xx1xx in the email and then name the photos accordingly so they get positioned where you want them rather than at the bottom :-)

2. Posted by Sander (Moderator 5087 posts) 8y Star this if you like it!

Most blog designs don't accommodate the largest size photos very well (in fact, even on your blog the photos go underneath the text of the sidebar; you obviously don't mind that that happens, but I imagine a great many people would be confused because of it). The large size photos also take quite a bit more bandwidth to load, which for a lot of people would really hamper the experience.
If the site did give the option to show the large photos by default (rather than medium), those are things that would probably need to either be fixed first, or explained in such a way that even the most non-technically inclined of our users who'd look at the option would understand the consequences and be able to make an informed decision.

That said, I can probably make things easier for you by giving you a bit of javascript which you can run by copy/pasting it into the location bar, and which will automatically insert the large_ before each of your photos. Do that once you've otherwise finished writing the blog entry, and that should save you a bit of time again. :)

So after inserting all the regular size photos into the blog entry, copy paste the following line (all one line; remove any linebreaks) into the location bar and hit enter. (Only do this once, otherwise you'll have large_large_ before the filenames, and would need to manually fix _that_ again. Also, this leaves thumbnail sized photos alone.)

javascript:(function(){var el = document.getElementById("canvas"); if (el.nodeName == "TEXTAREA") { el.value = el.value.replace(/(\[img=http:\/\/\/\d{1,6}\/)([a-zA-Z0-9-_.]*\.[a-zA-Z0-9]{1,5}\])/g, "$1large_$2");}})();

I've tested this with SeaMonkey 1.1.13 (equivalent to Firefox 2) and IE 6. It should be perfectly safe, but I'd recommend saving your blog entry text in a notepad file or something before running it anyway, just in case. (I don't want to be responsible for hours of lost work.) :)

(In case you're travelling with laptop: you could save that entire line as a bookmark (a javascript bookmark like that is commonly called a "bookmarklet"), and run it just by clicking on it.)

[ Edit: Edited on Nov 2, 2008, at 4:43 AM by Sander ]

3. Posted by Dodgey (Full Member 6 posts) 8y Star this if you like it!

Wonderful - thanks! Mega useful.

I know it messes up the formatting but I like to tell my story with pictures and the small ones are just too small :-)

4. Posted by Peter (Admin 6188 posts) 8y Star this if you like it!

I know it messes up the formatting but I like to tell my story with pictures and the small ones are just too small :-)

I'd suggest maybe choosing the Postcard template. Of all the designs, it's the one that handles those large photos the best. The photos tuck under navigation if the browser window is too small, but when you're viewing your blog with a reasonably large browser window, it works great. You could guarantee that it doesn't tuck under by then editing the template and changing the width of the #wrapper to "width: 1320px;" (instead of "width:100%") (let me know if you need more detailed instructions to achieve that.)

Of course, a width of 1320px is actually REALLY wide and many monitors won't show all of that, but it will look great for those that do work ;)

The Airport template also doesn't have any overlapping, but it pushes the content too far over to the right. If you prefer to use that one, let me know and I could probably work out a quick fix to the style.

5. Posted by Dodgey (Full Member 6 posts) 8y Star this if you like it!

Excellent help as always! - I've changed to the postcard template and all looks good now. I've been uploading at 1280x 1024 but notice the pics are at 800x600 so I guess I'll resize to that from now on before uploading.