Code

Discussion on Justified Image Grid - Premium WordPress Gallery

Discussion on Justified Image Grid - Premium WordPress Gallery

By
Cart 23,132 sales
Recently Updated

Firsh supports this item

Supported

This author's response time can be up to 1 business day.

8469 comments found.

Hello, I guess it’s common to upload the original photo data (e.g. 4 MB of JPG), and resize it to show in the gallery to shorten the loading time. While I was looking for a way to enable visitors download the original file not the resized data shown on the lightbox (in my case PhotoSwipe), I encountered below discussion.

https://wordpress.org/support/topic/download-image-in-full-size-not-scaled/

This method worked for the JIG version of PhotoSwipe, I found. after line 1769 of “photoswipe4.min.js”, I added a line like this “t=t.replace(“-scaled”,”“),” Then the download is done for the original file e.g. “IMG0000.jpg” not resized “IMG0000-scaled.jpg”. This is not very clean method and works only for the specific naming files, though.

Here are my questions. I now wonder if this modification cause serious issues on other JIG functionality, I hope not. Hopefully you can confirm it. And it would be nice when I can rename the file from the original file name stored on the server to a new name during the download.

thank you for your reply. I expected that you don’t recommend modifying the code. Thanks anyway for the offer of unminified files, but it’s not necessary as I could manage to edit the minified file already. Just adding one line wasn’t that difficult. That’s good to hear you also have this option in your to-do-list, to enable downloading file selection.

Unfortunately, I can’t follow your explanation about the image ID. The link you attached isn’t really helpful to me since I don’t understand how the JS and those parameters from WP work. That’s OK, I will wait for your official update, and for the time being, the non-clean hack I applied still works, with my own risk.

Ok, I added your name to this task so I’ll let you know when this feature is improved. It makes perfect sense, and I hope to leave the download.php behind.

Thanks!

Hello. For the life of me I cannot get 4 images in the gallery to sit 100% in a post.

https://forever1995.com/exploring-self-with-portraits/

If I add another image it spans 100% like;

https://forever1995.com/recent-work/

Ive looked at the settings and no luck. Is there something I need to add to the gallery code that is;

[gallery columns=”4” link=”file” size=”full” ids=”11370,11369,11368,11367”]

thank you

Thanks. Sorry I have no idea what your explanation is :) Is there code to add or a setting I tick? Yes on large desktop they are small and span 50% while small 100% – I want them 100% on larger screens. Not fussed about small devices and two rows.

Any update in this please? Thanks

Sorry for the delay. By looking at it everything functions normally according to the automatic layout rules. If I zoom out or disable scaling of my 4K TV then yes they don’t fill the full row and align to the left. But that is governed by row height rules, so if you increase row height, that gives them a chance to be larger, but there always be someone out there with some superwide monitor for whom they will never fill a row. You can center them with “incomplete last row” I believe that’s the best way to handle this, among allowing a larger row height to begin with.

For example, 800 row height and 600 deviation, let’s see what it does. If they are too big, decrease the number. Since all of them are portrait oriented, JIG will try to go 800-1400 range first, before going for 200-600.

Note that operating systems implement a default scaling on high res monitors such as 4K. So while it might be 3840 wide, the browser viewport reported numbers could be 2560. On my 27” monitor that is certainly the case as it’s too small for 4K, text is too small so I use 150% scaling so text is as big as on 1440p without actually lowering the resolution. If you target 1440p or 150%-scaled 4K then the row height should reach about 950 maximum. Try 575 row height with 375 deviation in that case.

Hey Firsh, Hope your Holidays are going well. I would really like to try using a completely different Lightbox with JIG but I’m not really sure just how to do it. Could you give me an idea how to go about this? And I’m sure the scope of this is beyond what you could respond here so if you’re aware of resouce or tutorial that might help, that would would be just as helpful.

Yes, I got that far with a lightbox that was installed with a plugin and it seemed to work using that setting. The problem I’m having now is the lightbox I’m trying ( I just picked one to try) is not installed with a plug-in. I got it off Git Hub. I need to figure out how to get into Wordpress first. Let me get that squared away and if I’m still having problems I’ll get back with you. Thanks – have a good Christmas!

Pick the built and minified js and css and include them using WP best practices https://developer.wordpress.org/reference/hooks/wp_enqueue_scripts/#usage (hooks). PHP code is according to this post: https://letswp.justifiedgrid.com/php-code-snippets-wordpress/ I recommend the your-own-plugin way. That way it’s independent of the theme and you can put the js in the plugin folder as well.

Will do! Thanks again!

Hi. I’m thinking of using a comments plugin called wpDiscuz which allows users to upload images. These items can be identified in the Wordpress media library by using the dropdown filter for “wpDiscuz Media Items” I was wondering if Justified Image Gallery would be able to automatically display these images on a page. I asked a similar question on the wpDiscuz support forum and they suggested a Meta Key could be used to identify them. “meta_key =_wmu_comment_id”

I’m not sure if that could work. Any ideas?

The alternative might be to use something like Real Media Library plugin to manually move the wpDiscuz items into an identifiable folder. But I’d prefer it to be automatic.

I thought I should ask before I buy the plugin.

Thanks

Sure, first example: https://justifiedgrid.com/support/faq/media-library-query-args/

Create a single grid (design it in the admin), and note the ID. Place the gallery as template tag along with the custom code in the page template of the page (or via PHP code block of your builder). You need to get the current meta_value which would be that comment id (they just gave you the key, but a value is likely needed as well).

Thanks. I’ll look into that. Very helpful.

Updating from old version 2.9 to latest Can you advise how this can be done in a good manner

Backup your entire site with UpdraftPlus free backup plugin, just in case, it’s also good practice. I’m not aware of any breaking changes but the UI did change a lot, including how you create galleries. The changes followed the path WordPress and its ecosystem took, such as the introduction of builders instead of standard themes and a new editor (Gutenberg) instead of TinyMCE. So things will be in different places. Grids have a live preview now and can be centrally created and you don’t need to fiddle with shortcodes anymore. The old galleries should continue to work as-is.

Great, thank you for the explantion. I could do the update with out any problems

I’ve got two licences for JIG, cannot automatic update. Support has been finished. What’s going on?

Your licenses are now released from the previously bound hosts. https://justifiedgrid.com/support/faq/your-license-has-been-reset-what-does-it-mean/

Can I add shortcodes of other gallery, created by another plugin into the this gallery? So, it will be a shortcode instead of the image, but will show up as an image. I have a plugin that has tooltips on images and I need those tooltips once you open the image from your gallery. Thank you.

In some cases yes, but other plugins’ galleries might not use the “attached to this” way of creating galleries. If so, that would be [justified_image_grid id=123] where 123 is the ID of custom post that another gallery plugin is using under the hood to register images to that particular gallery.

Other plugins’ treatment of images (such as pinterest sharing overlay, ratings, or tooltips) are not known to apply to JIG at all.

If the tooltips are bound to the lightbox (or after clicking an image), that could work since 3rd-party lightboxes tend to work well.

Feel free to try though, if it doesn’t work your way I’ll approve a refund. (Sorry there is no demo version.)

Ok, thanks for the explanation.

I’m confused – is the price $18 normally or is that just the cyber sale? If it’s $18 normally that would be wonderful and I may purchase several licenses once I have a time to make sure it will suit our needs.

It’s just during the sale it is unlikely to be repeated as with new features/updates and due to inflation I’ll need to raise the base price eventually (haven’t raised in years). You have until the end of Dec 4 to use the discount. I’ll think of a way to cater for customers who need unlimited license because of several sites, but currently CodeCanyon doesn’t offer that kind licensing. I’m thinking of an off-marketplace version/offering that doesn’t break exclusivity rules, perhaps features sold separately.

Thanks for getting back to me. I bought a copy as you probably know. I may need volume licensing at some point in the future. If you come up with that, please let me know. It looks like a great plugin. I’m eager to try it, but I’m caught up in another project currently. I hope you do well on the sale!

I used your documentation to enable search in NGG: https://justifiedgrid.com/support/faq/show-search-results-justified-image-grid/

however there is some bug, that i could not solve.

On the main page where i added the search it works.

On that page the search form is:

<input type=”search” class=”search-field” placeholder=”Search pictures…” name=”s”>

on the search result page where your php code from search.php shows another search field the field is however only

<input type=”search” class=”search-field” placeholder=”Search pictures…”>

the name=”s” is missing. So a second search on the result page does not work an the search query in only ?jig_custom_search=nextgen missing ?s=word in front.

Any idea for this?

hi thanks so lot, working now (somewhere inside the code is a typo, coping it inside snipped makes an error. I just replaced the 1 old line with

$search_value = $wp_query->query_vars[’s’]; $search_value = str_replace([’ ’, ’+’], ’,’, $search_value);

and now it works!

Last thing, is it maybe somehow possible to sort the results so newest pictures are shown first? For example if i do https://www.partyamigo.de/?s=2023&jig_custom_search=nextgen it shows pictures from 20230101 before from 20230204

Ok @firsh sorry, was happy to early, does not work. does the order of search words must be in a special order inside filename? because “royal” finds all files with like laura_luca_royal_waldshut_glowup_20221210_047.jpg laura_luca_royal_waldshut_glowup_20221210_023.jpg

ans so on. But “Royal black” does show the same files (searching for royal only for example) finding but showing first

laura_luca_royal_waldshut_glowup_20221210_047.jpg laura_luca_royal_waldshut_glowup_20221210_023.jpg

before it shows files with (black) in name.

aleksej-gerter_tiengen_royal-black-party_20221105_063

Doing “Royal 2022” does show files with 2022 but without royal inside filename. Strange :-(

Sorry the search is just this basic, a better algorithm was planned but I ultimately canceled it. The plan is now to support cloud search that uses an index based on your content. If search is important on your site, I could help as a custom job to integrate Algolia, but it’s not a small task. Sample with JIG+Algolia: https://balvanyoshuba.hu/kereso/?angyal/huba-alkotasok/kepek/ Algolia itself: https://www.algolia.com/

The plugin will not auto-update. I am using on the below domain that is listed. Please advise how to auto-update?

Thank you, Salvatore

There is a new version of Justified Image Grid available. View version 4.3 details. Automatic update is unavailable for this plugin. Add your license key to JIG settings for automatic updates! Automatic update error! This purchase code is in use on: www.imperfectlyperfect.org! You need one regular license for each production site, except staging sites. Contact JIG support to reset your license (only the username is needed).

Your license is now released from the previously bound host!

Learn more at https://justifiedgrid.com/support/faq/your-license-has-been-reset-what-does-it-mean

Hello. I have two licences on two sites and one updates to the new version with no issues. The second has this error “An error occurred while updating Justified Image Grid: Update package not available.”

Hi, does it say in the yellow update note box on the all plugins list something about your license?

I think I know what’s up. It’s now updating. Thanks!

Great!

Hello, I’m using filters for my gallery and have styled them for desktop but can’t seem to change it for a mobile view. Using ’@media only screen’ to define the breakpoints in the custom css field (in the Filtering tab of the plugin) doesn’t work. Do you know how I would achieve this?

Hi, the CSS settings on the Filtering tab relay those values to be declarations in CSS (meaning they are already between curlies). Use the Custom CSS on the General tab of in the WP Customizer if you want to include breakpoints.

the youtube video galleries have stopped working. I tried using your own examples on your site and they don’t work on the site either. My guess is Google has changed something

Very much appreciated. Keep up the good work!

Just chiming in to let you know that the update is out that restores channels!

You’re a star. Much appreciated

https://dronologie.me/

I added the grid to my homepage and its pulling from facebook. I added the account like a week or two ago. It gallery appeared the first couple of days, but now its not showing anything? The shortcode is on the homepage. I even created a separate page named “my work” with the grid on there and it still does not show.

We continued in the email thread.

Two-time buyer here. When using JIG, I get error messages from ahrefs due to the double slashes it creates in the links to the images files in the jig1-html container, for examples on

https://peterthompson.ca/2545-rue-du-bourgogne/

The update is out! Thanks for the bug report.

Amazing news. Works great! Ahrefs is happy again! Thank you Firsh!

Hi, I try to “add current user” to Facebook (me) I get this message – “Sorry, something went wrong. We’re working on getting this fixed as soon as we can”. Is there another alternative?

Thanks! That worked.

Good morning. The plugin was working, but now its preventing other pages from loading. I updated it to the current version this morning. Now I cant get the app to add the FB page. I am at a loss. Can you help?

Sure, send me temporary wp-admin via the contact form on my profile.

I am using JIG to display Flickr searches. The sort by ” date taken descending” does not change the order of photos. I used the sort by “date posted descending” to ensure my search text is correct. I need to sort by date taken for my application. This sorting order did work before. I am not sure at which time it changed because I just noticed. Please look into this.

I checked the current API documentation https://www.flickr.com/services/api/flickr.photos.search.html and nothing has changed since JIG implemented this feature. I looked at the raw results from Flickr, just changing the sort between date posted asc/desc and the result is the same, Flickr is not re-ordering anymore.

JIG is currently not requesting date_upload,date_taken extras, but it could (for display in caption or to be used with custom sorting). I’m eyeing with extending the “Order by” in JIG settings General tab to any source that carries meaningful date information, but in this case JIG would be responsible for the order and only among the result set.

There would been a benefit of sorting at the source (Facebook, Flickr), as they could have more advanced methods (relevance, interestingness), but I agree it doesn’t seem to work when searching among my own uploaded photos. Don’t want to jump to conclusions but this seems like a bug or limitation by their API.

However, when not limited by a user ID (e.g. public photos), it all seems to work fine.

Thank you for such a detailed reply. I believe it is a bug with the Flickr API. They seem to often have random bugs. Recently they had an API bug that caused searches to be case sensitive when they had not been in the past. I had to change all my Grids to have both terms for each case.

I would prefer that JIG does the sorting. The display of the JIG can vary from the sorting of an album on Flickr. Different Grids can have the same search terms but different sorting. The less JIG is dependent on the Flickr API the better.

I hope the sorting feature is implemented in JIG so I can fix all the Grids on my site. I have 104 Grids currently.

It would be great if there was a way to make the sorting option dynamic on the front end of the site. This way a visitor could choose how to sort the photos being displayed. I have had to create multiple Grids to accomplish this. I would need to define custom sort, or search, terms that the front end user would be able to choose from. See my page, https://maconhockey.photos .

Sorting by JIG server side would only make sense if you already get all the needed photos in the grid. But for those where there are thousands of results but you intend to show the “top 10 most interesting” out of the larger result set, it would not work. It would cut the first 10 Flickr shows, and only sort among those 10.

Frontend sort already implies this and just reversing a direction by the visitor would not result in more photos being loaded that were previously undiscoverable even by scrolling to the bottom.

I’ll look at that order by setting for Flickr for an update!

have just purchased the plugin and not able to find any JIG block in elementor. where can I find it?

its not there. Screenshot is sent to you on mail

please reply

Replied via email requesting admin login to see why it’s not showing up for you.

Hello. How do you add a 30px gap to the bottom off the image grid? I need some more spacing as on mobile it sits right against the bottom. Thanks.

There is a margin around gallery setting on the general tab.

I know thanks. I specifically want to add padding/ margin to bottom of gallery as I mentioned.

Then the value would be

0 0 30px 0

as it’s the css shorthad of top right bottom left. The thumbnail spacing value gets added to the bottom, expecting another row, so if you are precise, substract that from 30.

is there is a download button on each photo ?

Hi, the feature can be activated, which helps users download the size that is currently displayed in the lightbox. PhotoSwipe has it in the menu but it can also be shown in the captions.

so they’ll download the resized photos not the original ones ?

Yes unless you opt to show full size in the lightbox. I aim to change this so the download link should always have access to the original (even make it appear for logged in users only, as an option).

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey