How to create banner image with two different dimensions ( one compatible with mobile and another compatible with laptop) in Figma - image

I want to create banner image which is compatible in both mobile and laptop view. I want to store banner image with two different dimensions in database and use appropriately for mobile and laptop view. The two images should be same ( ie any of the image should not be cropped, stretched or any part of the image should not be lost)
How to create such a banner image using Figma. The image should be exactly same when viewed in laptop and mobile.
The image created with different dimensions should be exactly same

Figma files are viewed as static artboards. So you illustrate designs for different platforms. You cannot make 2-in-1 designs that morphs depending on whether you're viewing the Figma file on a Desktop Computer, or a Mobile phone. That can only happen in an actual implemented webpage with Responsive Design best practices, and then viewed in real web browsers.
In Figma, you simply create the design of the Desktop version of that page, containing that banner, and a separate design of the Mobile version of that page, with a copy of the banner image, but resized according to your specifications.
You then present this to the devs during the handover, telling them that those two designs are for the same page, but have to be implemented using Responsive Design.

Related

any former recommendation for making background image in flutter app compatible with all screens?

Flutter dart
I'm about to finish programming an application and I want us to set wallpapers for the application's pages as background .. and i need your help friends if there any recommendation to make image Compatible with all screens for iOS and android
thanks
Making images as a background for every page might make your application laggy and bulky. I would rather suggest you use inbuilt options like the simple background color.
If you want to use images only then you can have different resolutions of the image as asset and using MediaQuery and LayoutBuilder you can change the image as per the size of the device.
You can have a look at this page to know more about adaptive applications

Integrating moving, common background image for carousel page in Xamarin.Forms

I'm trying to integrate a common wide background image for Xamarin Forms Carousel page. As the requirement I need to smoothly change the visible part of the image according to changes of child pages (Ex. moving the visible part of the theme background image of a mobile phone when moving the menu pages). Is there any way to achieve this approach.

Picture tag vs CSS media query

I want to know the benefits of using Picture tag vs the CSS media query in-terms of pure performance (website load time).
I am developing a website and clients are forcing me to use picture tag but I think both are same. Let me know your input.
<picture>
<source
media="(min-width: 650px)"
srcset="images/kitten-stretching.png">
<source
media="(min-width: 465px)"
srcset="images/kitten-sitting.png">
<img
src="images/kitten-curled.png"
alt="a cute kitten">
</picture>
or
using media query and targeting separate image tags.
Media query works this way:
Even when you are viewing a website in Desktop, it still downloads the styles of mobile.
Example: If you are hiding a small image in desktop, in a desktop still small image will be downloaded but won't be shown (if it is hidden).
Picture tag: If you have 3 different images for mobile, tablet and desktop.
Picture tag will download only mobile device image when a page loads (when on mobile), it will neglect other 2.
If you want to test:
1. Write HTML code as you have above for 3 different images.
2. Once you are in desktop, load the page. Now you have a desktop image which you can see.
3. Disconnect the internet from your laptop.
4. In your browser responsive mode, keep reducing the screen
5. When it hits the tablet width, you will see the image won't be visible and it will be broken.
6. That means the image for tablet was not downloaded earlier when page load.
I think the accepted answer/question is lacking some real world contextual details. When talking about performance, we're usually talking about performance on slower devices such as mobile devices, not desktops.
Example: If you are hiding a small image in desktop, in a desktop still small image will be downloaded but won't be shown (if it is hidden).
This is usually not a problem as desktops have faster processing and they don't run on data (larger bandwidth) unlike mobile devices.
The accepted answer never mentioned how CSS media queries behave on mobile devices - this method actually only applies the styles that satisfy the smallest media query. The reason why this method 'downloads' all styles on desktop is because of how media queries are usually written with mobile-first design, by setting a min-width criteria. So when loading the page in desktop, all your media queries would be satisfied thus they are all applied and the last one in the source order wins.
So in terms of performance on mobile devices, both methods are the same. Ultimately, the <picture> tag is still the most robust solution due to additional configuration options with the srcset attribute. However, sometimes you need to use CSS media queries instead of <picture> tags such as when dealing with background images.
Here's a recent guide from Google recommending CSS media queries for optimizing background images: https://web.dev/optimize-css-background-images-with-media-queries/

image dimensions newsletter mobile

Question: What would be the ideal image dimensions pertaining to newsletters delivered to mobile devices?
Background: I need to provide dimension specs to my graphics designer so we can deliver specific images related to the mobile device (using media queries).
Target devices are: iphone 3.5" , 4", iPad 10.1", iPad Mini, Android devices - Galaxy Nexus, Note, HTC One 4.7"
Thank you for your time answering my question.
This really depends on your layout. Are the images going to be full screen width? Padding? A general rule in design is to make it big because you can always downsize without losing quality. If there is even the tiniest possibility you would need these images for something bigger, create them big or in vector graphics.
There is also the issue of retina display. If you want to cater to this you need to double your image resolution, however this makes the email slower to download. There is no correct answer, so it depends on your target audience as you'd be benifiting retina displays but putting out the rest of mobile users.

universal application weight

I developed my app for Ipad, now I should adapt it for Iphone. My app is quite heavy with a lot of images that should be available offline. These images are located in xib files and are sometimes loaded dynamically from app bundle. I need to limit the size of my app.
should I make a universal app or two different apps (each one with its own set of images optimized for the device)?
If I do a single universal app can I dynamically resize my "dynamically loaded images" in code. what should I do for the images in xibs?
I finally found my answer, one app with different xib sharing the same view controllers.
To limit the weight :
Some images must be modified (eg: backgrounds) because they need to
be adapted to the iphone screen resolution. I just named them
image~iphone.png. The cool thing is that you dont need to modify
images'name in xib or code because the ~iphone signifies image for
the iphone.
Some others can remain the same (eg: buttons) and I'll just size them
down in the IB.

Resources