Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9228681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:23:06+00:00 2026-06-18T05:23:06+00:00

I want to reduce them to a maximum 200px width and keep the same

  • 0

I want to reduce them to a maximum 200px width and keep the same layout with the 10px spacing the photos have. Also I don’t want to style the posts to be that wide and use overflow:hidden that will only cut off the photosets.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T05:23:07+00:00Added an answer on June 18, 2026 at 5:23 am

    jQuery Solution

    For this solution you will need the latest version of jQuery and the jQuery plugin imagesLoaded included in the head of the theme before the following:

    <script type="text/javascript">
        $(document).ready(function() {
            $('iframe.photoset').each(function() {
                var i = this;
                $(i).attr("onload", "ps_resize(this)");
                var s = $(i).attr("src");
                s = s.replace(/\/500\//, "/200/");
                $(i).attr("src", s);
            });
         });
        function ps_resize(i) {
            $(i).contents().find("body").imagesLoaded(function() {
                $(i).attr("width", 200);
                $(i).attr("height", $(this).height());
             });
             return false;
        }
    </script>
    

    What Solution Does

    1. When the DOM is ready, find all the photoset iFrames
    2. For each iFrame…
      • set the “onload” attribute to your frame resizing function
      • get the frame’s source url, change the size (e.g. 500) to 200
      • set the frame’s source url (this will cause it to reload with a smaller photoset)
    3. In the resizing function…
      • wait for the images to load
      • set the frame width to 200
      • set the frame height to the new height of the photoset

    Additional Code for Infinite Scroll

    If you are using the Infinite Scroll jQuery Plugin, you will need to additionally include this in your success callback function:

    ...
    $(newElements).find('iframe.photoset').each(function() {
        var i = this;
        $(i).attr("onload", "ps_resize(this)");
        var s = $(i).attr("src");
        s = s.replace(/\/500\//, "/200/");
        $(i).attr("src", s);
     });
    ...
    

    Obviously, if you’re using Infinite Scroll, I would suggest defining a function that is called on each iFrame on both the initial load and the scroll so you don’t have repeated code to maintain.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a scenario where I want to reduce the margin of a Button
I have an URI image file, and I want to reduce its size to
Suppose i have an array $x = (31,12,13,25,18,10); I want to reduce this array
Ruby 1.8.6 I have an array containing numerical values. I want to reduce it
I have few text(SMS) messages and I want to segment them using period('.') as
I am starting with DBHandling. I have performed CRUD operation and i want them
I have five map reduce that I am running each separately. I want to
I have a process which contain two threads. I want to schedule them based
I have a set of image files, and I want to reduce the number
In my map reduce which gets a count I don’t want the document to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.