Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

malofx

macrumors 6502
Original poster
Mar 22, 2012
293
2,133
Los Angeles
Hello everyone,

I have a ton of pics and I would like to upload them into my site which is HTML/CSS, is there a code/way to make it easier to upload those pictures to my website without having to insert them one at a time on the HTML? I have 3 events and a total of 400 pics.

Thank you in advanced.
 
I have used http://galleria.io in the past. There's probably better options, either way whichever one you use is probably going to either read from a folder, or have you use some code around the paths.

Usually do a find and replace (this is for the ending):

Find: .JPG
Replace: .JPG with the code

And then add the beginning to the first bit of the line.

You can copy and paste the actual filenames from Finder by just selecting everything, Command-C, and then Command-P it into your editor. If you can get it to add the actual path, it will make finding and replacing the first part easier. I don't know how to do that myself, but I'm sure someone else does.
 
  • Like
Reactions: malofx
Hello everyone,

I have a ton of pics and I would like to upload them into my site which is HTML/CSS, is there a code/way to make it easier to upload those pictures to my website without having to insert them one at a time on the HTML? I have 3 events and a total of 400 pics.

Thank you in advanced.
Yep, open your server. Drag and drop all images to an 'images' folder. Write a little JavaScript loop (or use jQuery) to grab each image and insert it into the page.

To upload images to your server using a 'form' will require a backend language like PHP, Python, Ruby, ect.
 
  • Like
Reactions: malofx
I have used http://galleria.io in the past. There's probably better options, either way whichever one you use is probably going to either read from a folder, or have you use some code around the paths.

Usually do a find and replace (this is for the ending):

Find: .JPG
Replace: .JPG with the code

And then add the beginning to the first bit of the line.

You can copy and paste the actual filenames from Finder by just selecting everything, Command-C, and then Command-P it into your editor. If you can get it to add the actual path, it will make finding and replacing the first part easier. I don't know how to do that myself, but I'm sure someone else does.

I might try this, all thou, I do like the idea better of uploading a folder directly to the server and have a code read the images inside that folder and magically place them on my site.

This is what I have now.

Oscarmalo.com

If anyone has a code I can manipulate please send it my way, I am a beginner thou.


Thank you
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.