This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 7 replies, has 2 voices.

Last updated by Laura 7 months, 4 weeks ago.

Assigned support staff: Laura.

Author Posts
February 14, 2019 at 3:16 pm #3200565

Martino

Here
hidden link
I have a gallery created with ACF and rendered with


<?php 

			$images = get_field('gallery');
			$size = 'thumbnail'; // (thumbnail, medium, large, full or custom size)

			if( $images ): ?>
			    <ul class="gallery-page">
			        <?php foreach( $images as $image ): ?>
			            <li>
			            	<a href="<?php echo $image['url']; ?>" data-fancybox="gallery">
			            		<?php echo wp_get_attachment_image( $image['ID'], $size ); ?>
			            	</a>
			            </li>
			        <?php endforeach; ?>

			    </ul>
			    <div class="clear"></div>
			<?php endif; ?>

Now the client noticed that on the translated page the gallery is loaded but the images are full size:
hidden link

February 15, 2019 at 8:14 am #3203329

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Hi,

if the code works for you, you can use it without problems.
Let me know if you want us to debug the other code instead.

February 15, 2019 at 9:26 am #3203686

Martino

Hi Laura,
about my code: it works, I would like to know if there is any downside about it.

I'll try the other code on the Sandbox today.

February 15, 2019 at 9:50 am #3203855

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Hi,

there shouldn't be downsides to it. Please keep me updated.

February 15, 2019 at 5:55 pm #3206241

Martino

While I wasn't able to reproduce the problem in the Sandbox I think I've got it:
I needed to regenerate the thumbnail in the specific language i was working on.
Does this make any sense?

February 16, 2019 at 1:23 pm #3207847

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Hi,

yes, it makes sense. If you remember regenerating thumbnails was my first suggestion but you said it didn't work. Maybe they were regenerated only for the default language?

February 18, 2019 at 9:35 am #3210770

Martino

Yes, I didn't know thumb regeneration was supposed to be executed for eery single language.
Can you confirm that?

Thanks,
m.

February 18, 2019 at 2:46 pm #3212774

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Hi,

it's expected to run Regenerate Thumbnails for each language, so no issues here.