Landscape (small) images not displaying in listings pages

Hi,

I’m building a classified marketplace on listinghive. I’m stuck on an issue with the images not displaying on the listings page in the ‘landscape (small) format.’ This only seems to be an issue when the images have been uploaded from a mobile. The image displays fine in the single listing page.

I had initially thought this was to do with the file size. Mobile images are huge and for some reason the metadata is stripped during upload so I can’t smush them or regenerate the thumbnail. I assumed this was the issue so was looking for solutions to retain the metadata, but then as it does display in other formats I guess this is not the problem affecting the landscape (small) format.

Any suggestions on how to fix this would be appreciated.

Hi,

Please disable third-party plugins and customizations (if there are any) and if you use a caching plugin, make sure that caching is disabled for logged-in users.

Also, try to change the images size. Check this doc: How to customize the image sizes - HivePress Help Center

If the issue remains, provide us with more details and the link to your site, and we will check.

Thanks Nikita,

I’ve tried all of your suggestions from researching these issues elsewhere. No change I’m afraid.

Here is a link to a search result. Listings with images generated on mobile don’t display in this format. All ok once you click through to the listing itself though.

I’m happy to give you a temp login if this would help.

Thanks

https://re-bambino.co.uk/?post_type=hp_listing&latitude=&longitude=&_category=&s=earlswood&location=

Hi,

Unfortunately, we could not reproduce the problem locally. We recommend disabling third-party plugins, customizations and clearing the cache again. Also, if you have a child theme and you made any changes there, switch to the parent theme and check if the problem persists. Additionally, I recommend contacting your hosting provider, as they may be blocking the display of these images.

​I hope this is helpful to you.

Hi Andrii,

I’ve been speaking with my host EasyWP. We spent 2hrs trying lots of different things and in the end they conclude that the issue seems to be on the HivePress upload form (/submit-listing/details/). We added another form via elementor and the images uploaded quickly from a mobile. They suggest we need to increase the max file size and include HEIC on the options.

Unfortunately I can’t see a way of editing your form in the same way I can elsewhere on the site. On the elementor form we were able to set file size, etc. Is there a way of me customising this or do you need to do this at your end?

Thanks

Steve

Hi,

Please use this PHP snippet:

add_filter( 'hivepress/v1/models/listing', function( $model ) { $model['fields']['images']['formats'][] = 'heic'; return
$model; }, 1000 );

Also, you can check this plugin HEIC Support – WordPress plugin | WordPress.org

Please note that the code snippet we provided above allows you to add heic on our side, i.e. HivePress will use possible formats from WordPress functions.

Regarding image size, please check this doc How to customize the image sizes - HivePress Help Center

Thanks for the snippet Andrii. I have used the HEIC Support plugin and that does work for that part, but the code is a better solution.

I’m still stuck on the image size though. Maybe I’m misunderstanding something. Your link shows me how to resize the images on the various listing pages. The issue flagged by EasyWP is around a limitation on file size at the point of upload. The same file upload button on elementor has the option to adjust upload limits so I wondered if that was possible on the HivePress upload button?

Thanks

Steve

Hi,

Our image upload is almost no different, except for the restriction on png and jpg files. We use this core function to upload images media_handle_upload() | Function | WordPress Developer Resources
Therefore, we recommend using the code we provided you with above and the plugin HEIC Support – WordPress plugin | WordPress.org
Also, please check this tutorial How to Increase the Max Upload Size in WordPress

Hi Andrii,

I’ve spoken with EasyWP and we have fixed the upload issue. They don’t have an answer for the second issue where the images don’t display on the listings page. They have suggested this may be to do with how the image retrieval is configured in the theme.

Is it possible to speak with you or one of the team? Or even to give you access so you can check it over? I’ve followed all of your suggestions and I’ve not been able to fix it. As it stands the site is not fit for purpose and I’m now two weeks behind my deadline.

Any direct investigation would be hugely appreciated.

Thanks

Steve

Hi,

Unfortunately, we can’t give you more details because we tested it locally and on the demo version, and there are no such issues. Also, other users have not reported a similar issue. We have provided you with information on why such difficulties may arise; unfortunately, there are no other options. Additionally, you can test this yourself and check that the demo version does not have this issue.

Hi,

Please provide more details, or have you tried to replicate this issue on our demo version? Because everything is working correctly locally and on the demo version.

Hi Andrii,

I’m trying this on your demo version right now. I’m getting the same issue of images not loading from mobile (using an iphone, but set to jpg). It’s actually worse on the demo. On my site the images do appear after you refresh, but on the demo the image doesn’t come up at all. I’ve just put a listing up, but couldn’t add a photo, so unable to test whether it then appears in the listings page.

Should I send you a screen recording direct on email?

Steve

Hi,

Please send the example images you are trying to upload. Also, please send a screen recording. All this data can be sent to our email.

Hi Andrii,

Not sure how, but the issue is fixed! I’ve not touched it for a few days, but checked after your message and the new images are now displaying on the listing page. The previous listings are not, but that is as expected.

I see it’s also fixed on your demo site. I guess there has been some sort of update that has resolved this. Either way, thanks very much.

Steve

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.