cancel
Showing results for 
Search instead for 
Did you mean: 

Uptade CSS File

SOLVED

Uptade CSS File

Hey,

I have a problem with swatch images.. They are too small..

color problem.png

I repleced the size in _module.scss but it's still like that...

updateted.png

I flushed cache storage / chache but i can't update the css file..

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Uptade CSS File

@tibor_nagy2

 

You have to apply changes under app/design/frontend/{Package}/{themename}/etc/view.xmlfile.

For changes value of swatches you have to add your tag inside view.xml files

<media> <images module="Magento_Catalog">
<image
id="swatch_image" type="swatch_image"> <width>50</width> <height>50</height> </image> <image id="swatch_thumb" type="swatch_thumb"> <width>150</width> <height>130</height> </image> <image id="swatch_image_base" type="swatch_image"> <width>50</width> <height>50</height> </image> <image id="swatch_thumb_base" type="swatch_thumb"> <width>150</width> <height>130</height> </image>
</images> </media>

You can keep your specific field inside images tag.

Now applying changes, you have to clear cache and var folder after changes. Cheers

Manish Mittal
https://www.manishmittal.com/

View solution in original post

4 REPLIES 4

Re: Uptade CSS File

@tibor_nagy2

 

You have to apply changes under app/design/frontend/{Package}/{themename}/etc/view.xmlfile.

For changes value of swatches you have to add your tag inside view.xml files

<media> <images module="Magento_Catalog">
<image
id="swatch_image" type="swatch_image"> <width>50</width> <height>50</height> </image> <image id="swatch_thumb" type="swatch_thumb"> <width>150</width> <height>130</height> </image> <image id="swatch_image_base" type="swatch_image"> <width>50</width> <height>50</height> </image> <image id="swatch_thumb_base" type="swatch_thumb"> <width>150</width> <height>130</height> </image>
</images> </media>

You can keep your specific field inside images tag.

Now applying changes, you have to clear cache and var folder after changes. Cheers

Manish Mittal
https://www.manishmittal.com/

Re: Uptade CSS File

nopeee.png

Not working mate..

Re: Uptade CSS File

@tibor_nagy2

 

It should work. You can find more details in official doc:

https://devdocs.magento.com/guides/v2.1/frontend-dev-guide/themes/theme-images.html

Manish Mittal
https://www.manishmittal.com/

Re: Uptade CSS File

Hello @tibor_nagy2,

 

 

Each image assigned to a product must be resized in accordance with image metadata defined in a module’s view.xml configuration file. After resizing an image, its resized copy is stored in the cache (/pub/media/catalog/product/cache directory). Magento serves storefront images from cache.

Command usage:

php bin/magento catalog:images:resize

 

This command has no arguments or options. A progress indicator displays while the command runs.

The message Product images resized successfully displays to confirm the command succeeded.

 

--
If my answer is useful, please Accept as Solution & give Kudos